Button

The Button component provides a reusable pattern for button in the interface.

Buttons of type basic

The basic button has no background or border. The text color is determined by the color property. This button also lacks padding left and right.

Primary (href)

Buttons of type outlined

Outlined buttons consist of a border colored by the color property. The content(icon/text) will also be colored by the color property.

Primary outlined

Type filled

Buttons with type filled and in three different colors.

Primary filled

Buttons with both text and icon

You can choose to have both text and an icon. You can also switch positions of the text and icon by setting reverse to true.

Button with icon only

This is a button with only an icon. This is the only button that will be rendered as a square.

Button with icon only - sizes

Size

Different sizes ranging from sm to lg

Size with icons

Different sizes ranging from sm to lg with icons

Disabled buttons

A button with the data-attribute disabled set to true will be greyed out and cursor set to not-allowed.

Togglebuttons

When pressing a toggle-button the text color will go from black to primary to indicate it being toggled.

Basic buttons

Filled buttons

Outline buttons

Togglebuttons with interchangable labels and icons

When pressing a toggle-button label and/or the icon will be changed to indicate the action.

Toggle buttons with interchangable labels & icons

Type

Use the type attribute to help define the action of the button.

Pill-shaped buttons

By setting the pill attribute to true, the button will have a border-radius of 9999px, making it pill-shaped.

Primary (href)
Primary (href)
Primary (href)

API

Parameter Default Description
false The text-content of a button.
md The size of the button; sm, md, lg.
default The color scheme for the button.
button What button type.
filled The type of appearance, can be basic, filled or outlined.
normal If the shape of the button should be normal, or fully rounded (pill style).
false Where should the button link to?
_top Open a new tab or not?
button The tag to use for this component.
span The element containing the label.
true Enable / disable ripple on click.
false -
false Will toggle the color of the font.
false The name of the icon.
false Reverse the position of icon and text.
false Makes button full width.
[] Array of classes placed on the icon
[] Array of classes placed on the text
Aria label text for the button
true To use or not to use the disabled color even if the button is disabled

CSS API

Variable Default Type Values Description
var(--base) range - Main unit that drives radius and spacing scales.
var(--border-radius) range - Border Radius
var(--border-width) range - Size
var(--space) range - Base spacing unit. Used for padding and margin inside components.
var(--outer-space) range - Spacing between components. Use --space for spacing inside components.
var(--color--primary) color - Primary
var(--color--secondary) color - Secondary
var(--color--surface) color - Surface
var(--font-weight-medium) select 400, 500, 600, 700 Medium Weight
var(--font-family-base) font - Body Font
var(--color--surface-contrast) color - Used for text and icons on surface backgrounds with less contrast.
var(--shadow-color) rgba - Shadow Color
var(--shadow-amount) range - Multiplier for elevation shadows. 0 = none, 1 = default.
var(--color--primary-contrast) color - Primary Contrast
var(--color--primary-border) color - Manual companion token for primary border and hover states.
var(--color--primary-alt) color - Manual companion token for subtle primary surfaces.
var(--color--secondary-contrast) color - Secondary Contrast
var(--color--secondary-border) color - Manual companion token for secondary border and hover states.
var(--color--secondary-alt) color - Manual companion token for subtle secondary surfaces.
var(--color--surface-border) color - Manual companion token for borders on surface elements.
var(--color--surface-alt) color - Manual companion token for subtle surface backgrounds.
var(--corner-shape) select square, round, squircle, circular, bevel, scoop Corner Shape
var(--color--surface-contrast-muted) color - Derived muted contrast for text and icons on surface backgrounds.
var(--font-size-90) range - One step below base in the type scale.
var(--font-size-100) range - Base font size.
var(--font-size-200) range - One step above base in the type scale. Equivalent to h6/subtitle.