button Component

Button Class API Reference

Type Class Options Usage Notes
Base button Required base class Always required (except for close)
close Close button modifier Used with button class: button close
Style Variants outline Border only, no fill Modifier to button
ghost Transparent background Modifier to button
soft Subtle background Modifier to button
labeled With text label Changes to <div> element
Size tiny Extra small size Optional modifier
small Small size Optional modifier
(default) Medium size No class needed
large Large size Optional modifier
big Extra large size Optional modifier
Color (Semantic) primary Main action color Preferred for main actions
positive Success/confirm Green-based
negative Danger/delete Red-based
warning Caution/alert Yellow/orange-based
info Information Blue-based
Color (Extended) red, orange, yellow Warm colors Direct color names
olive, green, teal Green spectrum Direct color names
blue, violet, purple, pink, brown, grey, black Cool & neutral colors Direct color names
State Modifiers active Active/pressed state Visual state
disabled Disabled state Prevents interaction
loading Loading spinner Shows loading state
fluid Full width Takes container width
Icon icon [name] Icon button Replace [name] with icon name
notification Notification badge Special icon variant

Combination Examples

button large primary - Large primary button
button outline small negative - Small negative outline button
button ghost icon save - Ghost save icon button
button soft warning loading - Soft warning button with loading state
button icon settings tiny round - Tiny round settings icon

Modern Button System

Basic Buttons

Ghost Buttons

Button Sizes

Size Variations

Fluid Buttons

Fluid Width Buttons

Fluid Button Groups

Button Colors

Default & Brand Colors

Semantic Colors

Extended Color Palette

Outline Button Variants

Soft Button Variants

Icon Buttons

Square Icon Buttons

Round Icon Buttons

Round Text Buttons

Single Character
Numbers
Initials / Avatar Style
Short Labels
Emoji Buttons
Color Variations

Button States

Loading States

Disabled States

Button Groups

Default Button Group

Container-Level Sizing

Container-Level Colors

Button Groups with OR Divider

OR Divider with Different Colors

Icon Button Groups

Labeled Buttons

Basic Labeled Buttons

2,048
1.2K
523

Left Labeled Buttons

15.2MB
3 items

Labeled Icon Buttons

Default Labeled Icon Buttons

Download
Save File
Delete
Settings

Labeled Icon Button Sizes

Tiny
Small
Default
Large
Big

Left Icon Position

Previous
Go Back
Cancel

Basic Variants

Basic Primary
Basic Positive
Basic Negative

Notification Buttons

Notification Badge Buttons

Close Buttons

Close buttons provide a unified way to dismiss any element marked with the .dismissible class. They automatically find and close their nearest dismissible parent.

Basic Close Buttons

Success! Your changes have been saved.

The close button automatically finds its nearest parent with the .dismissible class and closes it. The button can be placed anywhere inside the dismissible container - it doesn't need to be a direct child.

Close Button Sizes

Note: Each button is wrapped in its own .dismissible container to display styles. Clicking them will trigger the dismiss animation but won't remove them from the page.

Close Button Colors

Note: Each button is wrapped in its own .dismissible container to display styles. Clicking them will trigger the dismiss animation but won't remove them from the page.

Alternative Ways to Create Close Buttons

Using class="button close" (standard way)

Using name="close" attribute (alternative)

Using both class and name attributes

How It Works

  • • Add .dismissible to any container you want to be closeable
  • • Add a button with either .button.close classes OR name="close" attribute
  • • The close button automatically finds and closes its nearest dismissible parent
  • • Works at any nesting depth - the button doesn't need to be a direct child
  • • ESC key closes the topmost dismissible element
  • • Supports all standard button sizes and colors when using .button.close classes

Button Overflow System

Button groups can handle overflow situations using two distinct patterns: click-to-expand for limited space and horizontal scrolling for maximum content visibility.

Click-to-Expand Pattern

Fixed Count (Show first 3 buttons)

Width-based (300px container)

Small buttons with overflow

Horizontal Scroll Pattern

Horizontal scrolling (400px container)

Try scrolling horizontally, using mouse wheel, or hovering near the edges

Separated scrolling buttons

Icon buttons with scrolling

Mixed Sizes and Colors

Tiny buttons with overflow

Large buttons with scrolling

Different color schemes

Form Action Overflow

Modal action buttons

This represents a modal footer with multiple actions that might overflow on smaller screens.

Toolbar actions with scrolling

Button Overflow Usage Guide

Click-to-Expand Pattern
  • class="buttons overflow"
  • data-max-visible="3" - Show first 3 buttons
  • data-max-width="300" - Fit within 300px
  • • Automatically creates "+X more" button
  • • Clicking expands to show all buttons
  • • Perfect for forms and action menus
Horizontal Scroll Pattern
  • class="buttons overflow scroll"
  • data-max-width="400" - Container width
  • • Mouse wheel scrolling supported
  • • Hover zones for auto-scroll
  • • Fade indicators at edges
  • • Perfect for navigation and toolbars

Pro Tip: Both patterns inherit size and color from the container class. Use buttons small overflow primary to make all buttons small and primary colored.