Button

Use button variants for primary actions, secondary actions, and lower-emphasis actions.

Usage

Sizes and states

API reference

ButtonProps

variant'primary' | 'secondary' | 'ghost' | 'danger''primary'

Name: variant

Description: Visual style variant for the button.

Type: 'primary' | 'secondary' | 'ghost' | 'danger'

Default: 'primary'

size'sm' | 'md' | 'lg''md'

Name: size

Description: Controls button sizing.

Type: 'sm' | 'md' | 'lg'

Default: 'md'

loadingbooleanfalse

Name: loading

Description: Shows spinner and marks the button as busy.

Type: boolean

Default: false

aria-labelstring

Name: aria-label

Description: Accessible name. Required when no visible label text is provided.

Type: string

Default:

Accessibility

  • WCAG 2.1.1 Keyboard: Full keyboard support (Enter/Space)
  • WCAG 2.4.7 Focus Visible: Clear focus indicators
  • WCAG 4.1.2 Name, Role, Value: Proper ARIA attributes

Playground

Open Button stories