Toggle Sidebar B
Light / Dark Mode DLog in Sign up

Button

Triggers an action. Seven visual variants and five sizes. Renders as a NuxtLink when the to prop is set.

Default

Primary action button.

Variants

Default for primary actions, secondary as a companion, outline for neutral, destructive for destructive actions, ghost for toolbars, link for inline text.

Sizes

sm (h-8), default (h-9), lg (h-10), iconSm (size-8), icon (size-9).

With icon

Drop an Icon inside the default slot. Horizontal padding adjusts on its own.

Disabled

The disabled attribute drops opacity and blocks pointer events.

Loading

There is no built-in loading prop. Combine disabled with a spinning Icon (hugeicons:loading-03).

API Reference

Props, events, and slots for each sub-component.

Button

Props

PropTypeDefaultDescription
variant"default" | "secondary" | "outline" | "outline-destructive" | "destructive" | "ghost" | "link""default"Visual style.
size"sm" | "default" | "lg" | "icon" | "iconSm""default"Height and padding.
tostringRenders as NuxtLink when set. External URLs (http) open in a new tab.
asstring"button"HTML element to render when to is empty.
asChildbooleanfalseRender the child slot without a wrapper element.
classstringExtra classes, merged with cn().