Button: Pill
shape="pill" rounds the ends fully, and icon sizes become circles. It suits buttons that sit inside rounded surfaces, like a chat composer.
This adds the example as components/examples/button/pill.tsx, together with the Button component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/button-pill.jsonTo add only the component, follow the Button installation.
Props in this example
The Button props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
variant | "default" | "outline" | "secondary" | "ghost" | "ghost-destructive" | "destructive" | "link" | "default" |
size | "xs" | "sm" | "default" | "lg" | "icon-xs" | "icon-sm" | "icon" | "icon-lg" | "icon-xl" | "default" |
shape | "default" | "pill" | "default" |
Every prop is in the Button API reference.
- Variants
- Sizes
- With icon
- Disabled
- Custom labels
- Smooth width
- Error details
- Forms
- Icon buttons
- Feedback on every variant
- Controlled loading
- Controlled status
- As a link
- Right to left
See them all, with keyboard support and accessibility notes, on the Button page.
- SpinnerA loading indicator with Apple-style ticks or a breathing ring that can wait before showing and stay long enough not to flicker.
- useButtonFeedbackRuns an async action through loading, success and error, skipping the spinner for fast requests and holding an error while you read it.
- Button groupButtons joined into one control, with shared seams, separators, text addons, nesting and vertical stacks.
- ToggleA button that stays on or off, with a fill that settles in when pressed, a clear hover-to-on step and icons that can fill with the state.
- Toggle groupA row of toggles for one choice or many, with a fill that slides to the picked item, joined or spaced items and arrow-key focus.
- AlertInline messages for status and feedback, with a neutral surface, a colored icon and a dismiss that collapses smoothly.