Button

Triggers actions and events across the interface.

Installation

1 pnpm dlx mono add button

Usage

1import { Button } from "@/components/ui/button"
<Button variant="primary">Button</Button>

Examples

Primary

The default high-emphasis button.

Secondary

Medium-emphasis button for secondary actions.

Outline

Low-emphasis button with a visible border.

Ghost

Minimal button, background appears only on hover.

Info

Draws attention for informational actions.

Success

Confirms a positive or completed action.

Warning

Used for actions that need caution.

Destructive

Used for irreversible or dangerous actions.

With Leading Icon

Icon placed before the label.

With Trailing Icon

Icon placed after the label.

Icon Only

Compact square button, no visible label.

Disabled

Non-interactive state, reduced emphasis.

Sizes

Small, Default and Large sizes.

Anatomy

  • Button - Root element handling all variants and states
  • leadingIcon - Optional icon rendered before the label
  • trailingIcon - Optional icon rendered after the label
  • iconOnly - Renders a compact square button with no label

Props

Button

Prop Type Default
variant'primary' | 'secondary' | 'outline' | 'ghost' | 'link' | 'info' | 'success' | 'warning' | 'destructive''primary'
size'sm' | 'default' | 'lg''default'
leadingIconReactNodeundefined
trailingIconReactNodeundefined
iconOnlyReactNodeundefined
disabledbooleanfalse