Input group: Sizes
size on the group sets the height and passes down to the input, matching <Input /> sizes. Buttons keep concentric corners at every size.
This adds the example as components/examples/input-group/sizes.tsx, together with the Input group component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/input-group-sizes.jsonTo add only the component, follow the Input group installation.
Props in this example
The Input group props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
sizeHeight of the group, passed down to the input. | "sm" | "default" | "lg" | "default" |
| Prop | Type | Default |
|---|---|---|
align | "inline-start" | "inline-end" | "block-start" | "block-end" | "inline-start" |
Every prop is in the Input group API reference.
- Icon
- Clear
- Character count
- Text
- Button
- Keyboard hint
- Textarea
- Header
- Password
- Invalid
- Disabled
- Loading
- Dropdown
- Long content
- Right to left
See them all, with keyboard support and accessibility notes, on the Input group page.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- InputA text input with three sizes, invalid and read-only states, native validation styling and a 16px touch font so phones never zoom in.
- MotionThe easing curves, durations and reduced-motion check every component animates with, plus hooks for size morphs and sliding highlights.
- useAutosizeGrows a textarea with what you write between its minimum and maximum height, animating each change without ever touching the text.
- useComposedRefKeeps a ref to your own element while still forwarding it to whatever ref the parent passed in.
- useInvalidShakeShakes a form control when a submit attempt finds it invalid, and never while someone is still typing.