Button
Examples
Variants
One primary action per view; secondary and outline beside it, ghost in toolbars, and destructive for actions that can't be undone.
Sizes
Four text sizes, and icon-only sizes that need an aria-label.
Loading
loading shows a spinner, sets aria-busy and ignores clicks while keeping focus. loadingLabel replaces the label for the duration and holds the button's width.
Usage
Import
import { Button } from "@qeetrix/ui";It can also be imported on its own from @qeetrix/ui/components/button.
Variant props
| Prop | Values |
|---|---|
variant | default · outline · secondary · ghost · destructive · link |
size | default · xs · sm · lg · icon · icon-xs · icon-sm · icon-lg |
States
hover · focus-visible · active · disabled · loading · invalid · busy
Support
| Feature | Status |
|---|---|
| Right-to-left | Supported |
| Dark mode | Supported |
| Density | Supported |
| Server rendering | Renders on the server |
| Reduced motion | Supported |
Accessibility
Follows the WAI-ARIA button pattern. Audited.
| Check | Result |
|---|---|
| Semantics | Pass |
| Accessible name | Pass |
| Keyboard | Pass |
| Focus | Pass |
| Screen reader | Pass |
| Right-to-left | Not applicable |
| Reduced motion | Pass |
| Forced colours | Pass |
| Contrast | Pass |
Keyboard
Enter Space TabTests
Covered by unit, accessibility (axe), interaction and visual tests.