Skip to main content
Interactive elements that trigger actions with consistent styling and behavior.

Button Variants

Primary action button with high emphasis.Usage: Primary actions, Form submissions, Call-to-action buttons
Secondary action button with medium emphasis.Usage: Secondary actions, Alternative options, Supporting actions
Outlined button with subtle emphasis.Usage: Less important actions, Cancel buttons, Tertiary actions
Minimal button with low visual weight.Usage: Navigation, Menu items, Subtle interactions
Destructive action button for dangerous operations.Usage: Delete actions, Irreversible operations, Warning actions

Button Sizes

Button States

Icon Buttons

Buttons with Icons

Icon-Only Buttons

Always include proper aria-labels or title attributes for icon-only buttons for accessibility.

Best Practices

Do

  • Use primary buttons for the most important action on a page - Limit primary buttons to one per page or section - Use consistent button sizes within the same context - Provide clear, action-oriented button labels - Include loading states for async operations - Ensure sufficient touch target size (44px minimum) - Ghost buttons automatically adapt text color for dark mode - Outline buttons use white borders and text in dark mode

Don't

  • Use multiple primary buttons in the same area - Make buttons too small for easy interaction - Use vague labels like “Click here” or “Submit” - Place destructive actions next to primary actions - Forget disabled states for invalid actions - Use buttons for navigation (use links instead)

Dark Mode Behavior

All button variants automatically adapt to dark mode using CSS custom properties and Tailwind’s dark mode utilities.
  • Primary: Uses primary color (neutral-900) - Secondary: Uses secondary background - Outline: Gray border with default text - Ghost: Transparent background

Implementation

Template

Component