Button: Disabled
focusableWhenDisabled keeps a disabled button in the tab order, so a tooltip or explanation can still be reached by keyboard.
This adds the example as components/examples/button/disabled.tsx, together with the Button component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/button-disabled.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" |
disabled | boolean | false |
focusableWhenDisabledAlways true while loading. | boolean | false |
Every prop is in the Button API reference.
- Variants
- Sizes
- Pill
- With icon
- 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.