Buttons

Buttons are interactive elements that trigger actions, submit forms, or navigate users through your application. They come in various styles, sizes, and states to meet different design needs.

Variants

Choose from five button variants to convey different levels of emphasis and purpose in your interface.

Button Variants

100%
Solid Button Outline Button Ghost Button Soft Button Link Button

Colors

Buttons support a wide range of colors to match your brand and indicate different actions or states.

Button Colors

100%
Primary Action Success Danger Warning Info Default

Sizes

Available in five sizes to fit different contexts and layout requirements.

Button Sizes

100%
Extra Small Small Medium Large Extra Large

Icons

Add icons to buttons to enhance visual communication and provide additional context.

Buttons with Icons

100%
Add Item Delete Processing Continue

States

Buttons can reflect different states to communicate their current status or availability.

Button States

100%
Default Disabled Loading Processing

Common Patterns

Primary & Secondary Actions

Action Patterns

100%
Save Changes Cancel

Dangerous Actions

Dangerous Actions

100%
Delete Account Cancel

API Reference

Properties

Property Type Default Description variant string 'solid' 'solid', 'outline', 'ghost', 'soft', 'link' color string 'blue' Any color from the theme palette size string 'md' 'xs', 'sm', 'md', 'lg', 'xl' icon string - Name of the icon to display disabled boolean false Disables the button loading boolean false Shows loading state

Events

Event Description click Fired when the button is clicked

Size Reference

Size Example Use Case xs Button Compact UIs, tight spaces sm Button Secondary actions md Button Default size, most use cases lg Button Primary actions, CTAs xl Button Hero sections, prominent actions

Best Practices

  • Use clear, action-oriented text for button labels
  • Choose appropriate variants based on action importance
  • Maintain consistent sizing within the same context
  • Use loading states for asynchronous actions
  • Include icons only when they add value
  • Follow a clear visual hierarchy with button variants

Accessibility

Buttons are built with accessibility in mind:

  • Proper role="button" when needed
  • Keyboard navigation support
  • Loading state announcements
  • Disabled state handling
  • Focus management
Pro tip: Use the solid variant for primary actions and outline or ghost variants for secondary actions to create clear visual hierarchy.