Skip to content

Button

Buttons trigger actions or navigation. They support variants, sizes, outline and loading states, optional icons, link styling, and destructive emphasis.

Loading Code Block...

Standard configuration: variant="default", size="md", and a text label.

Loading Code Block...

Sizes: xs, sm, md, lg, xl. Use the dropdown to switch size; the snippet updates to match.

Loading Code Block...

variant controls visual style: default, secondary, ghost, or link.

Loading Code Block...

Set isOutline for a bordered, transparent background on any variant.

Loading Code Block...

disabled blocks interaction and applies muted styles.

Loading Code Block...

loading shows a spinner and disables the button. Use loadingText for alternate copy while loading, and hideloadingSpinner to keep the loading state without the spinner.

Loading Code Block...
Loading Code Block...

fullWidth stretches the button to the container width.

Loading Code Block...

destructive applies danger styling (for delete or irreversible actions).

Loading Code Block...

underline adds a hover underline; it is intended for variant="link".

Loading Code Block...

PropsDefaultTypeDescription
variant'default''default' | 'secondary' | 'ghost' | 'link'Visual style variant.
size'md''xs' | 'sm' | 'md' | 'lg' | 'xl'Button size (padding and typography).
text-stringLabel text.
disabledfalsebooleanDisables interaction.
isOutlinefalsebooleanOutlined style (transparent fill, visible border).
icon-ReactNodePre-rendered icon element (e.g. `icon={<PlusIcon />}`). Combined with `iconPosition` to place left or right of the label.
iconPosition'left''left' | 'right'Icon position relative to the label.
fullWidthfalsebooleanFull width of the parent container.
loadingfalsebooleanLoading state; shows spinner unless hidden.
loadingText-stringOptional text while loading; falls back to `text`.
hideloadingSpinnerfalsebooleanHide the spinner while `loading` remains true (prop name is `hideloadingSpinner` in source).
destructivefalsebooleanDanger / destructive emphasis.
fontCase'uppercase''uppercase' | 'sentence'Casing for the label.
underlinefalsebooleanHover underline; use with `variant="link"`.
href-stringIf set, the component switches from `<button>` to a link element. React always renders `<a href>`. Vue renders `<router-link :to>` for internal paths and `<a href>` for external URLs (so `vue-router` must be installed). Disabled / loading links suppress click handling in both frameworks.
onClick-() => voidReact: `onClick` prop. Vue: emitted as `click` — bind with `@click="handler"`.
  • Use a native button for actions and href only when navigating (the component switches to a link when href is set).
  • Expose a clear accessible name via text or associated content; for icon-only usage, provide aria-label through underlying button props where supported.
  • Do not rely on colour alone for destructive actions; pair destructive with explicit copy.