Skip to content

Button ​

A clickable action component from @pixlet/button.

Variants ​

vue
<PixButton variant="primary">Primary</PixButton>
<PixButton variant="secondary">Secondary</PixButton>

Sizes ​

Loading ​

Installation ​

bash
pnpm add @pixlet/button @pixlet/tokens

API ​

PropTypeDefault
variant'primary' | 'secondary''primary'
size'sm' | 'md''md'
disabledbooleanfalse
loadingbooleanfalse
type'button' | 'submit' | 'reset''button'

The component forwards native button events and attributes through Vue's fallthrough attributes.

Use the default slot for the button label. A loading button keeps the slot visible, disables native activation, and exposes aria-busy="true".

Styling tokens ​

TokenControls
--pix-button-bgPrimary background
--pix-button-fgPrimary label color
--pix-button-hover-bgPrimary hover background
--pix-button-secondary-bgSecondary background
--pix-button-secondary-fgSecondary label and border color
--pix-button-focus-ringKeyboard focus outline color
--pix-button-radiusCorner radius
--pix-button-gapGap between the spinner and label