Button

Button

A polymorphic button component with built-in loading states and keyboard support.

Usage

typescript
1import { Button } from '@flint-ui/core'
2
3<Button variant="primary" size="md" onClick={handleClick}>
4 Save Changes
5</Button>

Props

PropTypeDefaultDescription
variant'primary' | 'secondary' | 'ghost''primary'Visual style
size'sm' | 'md' | 'lg''md'Button size
loadingbooleanfalseShows spinner, disables click
disabledbooleanfalseDisables interaction
asChildbooleanfalseRenders as child element

Accessibility

Automatically handles aria-disabled, aria-busy (when loading), and keyboard focus management. Tab order follows DOM. Enter and Space trigger click.

<callout>All Flint UI components follow WAI-ARIA patterns. Keyboard navigation works out of the box.


Advanced Usage