API and Development
Button from @prepared911/ui/button with icon and label and no children. The label is visually hidden and is the accessible name. tooltip is optional hover copy. There is no separate icon-button component, no pill prop, and no ButtonType.
| Name | Default | Description |
|---|---|---|
icon | required with label | A glyph, usually <Icon glyph={...} />. |
label | required with icon | Localized accessible name. It is not a separate tooltip. |
tooltip | none | Extra hover copy. Placement belongs to Tooltip. |
intent | ButtonIntent.Neutral | Accent, Destructive, Success, or Warning. |
variant | ButtonVariant.Soft | Solid, Ghost, or Plain. Ghost is the usual in-field and toolbar look. |
size | ButtonSize.Large | Small (24px), Medium (28px), or Large (32px). |
disabled | false | Whether the button is disabled. |
onClick | Function to call on click. | |
onMouseEnter | Function to call on mouse enter. | |
onMouseLeave | Function to call on mouse leave. | |
onMouseDown | Function to call on mouse down. | |
onMouseUp | Function to call on mouse up. | |
className | Additional CSS classes to apply. | |
toggle | false | Non-link only. Opt in to sustained aria-pressed via standalone Radix Toggle (asChild). Inherited from Button. |
pressed / defaultPressed / onPressedChange | Non-link only. Controlled or uncontrolled pressed state when toggle is true. Link Button strips these props before spreading onto the DOM. |
pill prop to opt in to a fully rounded (pill / circular) border radius. Intended for floating toolbars and FAB-style controls such as the staff panel toggle. pill works with any ButtonType; combine with cornerStyle={ComponentCornerStyle.Sharp} to override back to square corners when a brand or layout requires it.
Button shares the same three sizes as Button for consistent density.