brijr/ui

Lab

Button

npx shadcn@latest add @brijr/button

Variants

default
secondary
outline
ghost
destructive
link

Sizes

xs
sm
default
lg
icon-xs
icon-sm
icon
icon-lg

With icon

xs · start
sm · start
default · start
lg · start
default · end
destructive · start

Disabled

Every variant, disabled. A disabled button leaves the tab order.

default
secondary
outline
ghost
destructive
link

States

Tab through this row to see the focus ring on each variant.

aria-invalid
aria-expanded
Link buttonrender={<a />}
Link buttonrender={<a />} · disabled

Focusable when disabled

Stays in the tab order and can be hovered, so a tooltip can say why it is unavailable. Presses do nothing.

default
secondary
outline
ghost
destructive
link

Pending

Return a Promise from onClick and the button stays pending, and ignores presses, until it settles. Press each one.

label swap · data-show
icon swap · data-show
label swap · trailing icon
no swap
default · pending
secondary · pending
outline · pending
ghost · pending
destructive · pending
link · pending

Content

long label
full width