Input group: Button
<InputGroupButton /> is a ghost button sized to fit inside the field. Its corners are concentric with the group's, and it gets its own focus ring.
This adds the example as components/examples/input-group/button.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-button.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 |
|---|---|---|
readOnly | boolean | false |
| Prop | Type | Default |
|---|---|---|
align | "inline-start" | "inline-end" | "block-start" | "block-end" | "inline-start" |
| Prop | Type | Default |
|---|---|---|
variant | "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | "ghost" |
size | "xs" | "sm" | "icon-xs" | "icon-sm" | "xs" |
Every prop is in the Input group API reference.
- Icon
- Clear
- Character count
- Text
- Keyboard hint
- Textarea
- Header
- Password
- Sizes
- 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.