button component

Drop-in semantic component. See examples, sizes, variants, and source.

Click target. Apply intent (primary, positive, negative, warning, info) and an optional variant (outline, ghost, soft) to button. Add icon name for an icon (square), plus round for a circular button. Use labeled to attach a side label, loading for a spinner state, or close + .dismissible parent for an auto-wired close button. Group with buttons; overflow / scroll behaviour comes from button.js.

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.

Class API Reference

Type Class Usage Notes
Base button Required base class Always required
buttons Group container — children inherit size + color Wrap with buttons sm primary etc.
close Close-button modifier — auto-closes nearest .dismissible parent Use as button close icon x
Sizes xs Tiny Modifier on button
sm Small Modifier on button
(default) Medium No size class needed
xl Large Modifier on button
lg Big Modifier on button
Variants (default) Filled — solid intent background No variant class needed
outline Border-only with intent color Modifier on button
ghost Transparent — intent text only Modifier on button
soft Tinted background Modifier on button
Intents primary, positive, negative, warning, info, red, orange, yellow, olive, green, teal, blue, violet, purple, pink, brown, grey, black Recolour the button — semantic intents preferred Modifier on button
Shape & Layout icon [name] Auto-mount an icon — button icon settings for square icon-only Append right to flip side: icon right arrow-right
round Circular shape — pair with icon, text, avatar, or emoji Modifier on button
fluid Stretches to container width Modifier on button or buttons
labeled [left] Adds an attached .label count/badge — left flips its side Wrap a button + span.label
separated Gap between buttons in a group Modifier on buttons
States active Pressed/selected Modifier on button
loading Spinner overlay Modifier on button
disabled Disabled HTML attribute, not a class
Group Behaviour overflow Click-to-expand "+N more" — hidden buttons collapse Pair with data-max-visible or data-max-width
overflow scroll Horizontal-scroll group with edge fades Pair with data-max-width
data-notification Floating count badge on a button e.g. data-notification="5"