Input Group
FormsCombines a text control with adjacent prefixes, suffixes, or actions in one input surface.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/input-group.jsonThe command includes the component’s shared dependencies. Your project keeps editable source files.
Include the complete example
This example also composes label, typography. Install its parts together:
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/input-group.json https://luv-jeri.github.io/cojeev-ui/r/label.json https://luv-jeri.github.io/cojeev-ui/r/typography.jsonUsing input group
Place InputGroupInput or InputGroupTextarea with addons and text to show units or contextual information.
Use InputGroupButton for a related action and connect it to the same value through your state.
API
Compose the exported parts below. The prop types are read from the React source during the registry build.
Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.
InputGroupProps
Accepts the native or primitive props declared by its exported TypeScript type.
InputGroupAddonProps
Accepts the native or primitive props declared by its exported TypeScript type.
InputGroupInputProps
Accepts the native or primitive props declared by its exported TypeScript type.
InputGroupTextareaProps
Accepts the native or primitive props declared by its exported TypeScript type.
InputGroupButtonProps
Accepts the native or primitive props declared by its exported TypeScript type.
InputGroupTextProps
Accepts the native or primitive props declared by its exported TypeScript type.
InputSearchProps
Accepts the native or primitive props declared by its exported TypeScript type.
InputSearchScopeProps
Accepts the native or primitive props declared by its exported TypeScript type.
InputSearchDiskProps
Accepts the native or primitive props declared by its exported TypeScript type.
Accessibility
Label the actual input or textarea and give each addon button an accessible name.
Associate meaningful prefixes, units, and instructions with the control instead of relying on visual adjacency alone.
States and appearance
For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.
Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.