Skip to main content

Appearances and variants

Each variant comes in three appearances: subtle is the light tinted look, outline has a coloured ring, and solid is the strongest emphasis (the default). Use primary for the main action of a view, one per section. Success, info and warning solid use dark text because white text on these colours does not reach 4.5:1.

Subtle

Outline

Solid

Sizes

Five sizes from extra small to extra large. Medium is the default.

With icons

icon takes full Font Awesome classes. The icon sits before the text, or after it with icon-position="end". Icons are decorative and hidden from assistive tech.

Icon only

icon without text makes a square button. It has no visible text, so every one needs an aria-label.

States

Hover, pressed and keyboard focus are built into every variant. disabled fades the button and ignores clicks.

Subtle

Outline

Solid

Loading

loading disables the button, sets aria-busy="true", and shows a spinner in place of the icon (or before the text). loading-text replaces the text while loading.

Subtle

Outline

Solid

With an icon

Full width

Add w-full to fill the container, for example in a narrow form.

Button group

Join related buttons. The group sets the default size and appearance of its buttons; a value on a button wins. The wrapper has role="group" and needs an aria-label; the selected choice is marked with aria-pressed or aria-current, and the group styles it from that attribute. On narrow screens it scrolls sideways.

Subtle

Outline

Solid

Sizes

Selection

Social

Sign-in buttons in each provider's own colours and logo, as their brand guidelines ask. brand sets the colours and the inline SVG logo; without text the button is square and named "Continue with <Brand>". Brand colours are fixed values, not theme tokens; dark-fill buttons get a faint ring in dark mode so they do not vanish.

Icon only

Link and disabled

Sign in with GitHub