Menu
Esc
DocsGitHub TR

Components

Button

Starts an action. Comes in solid and ghost variants, seven tones and four sizes, with optional icons, subtitle, dropdown arrow and loading state.

Open in Figma

Playground

Figma variant

🎛 Type=Button
💅 Style=Primary
👕 Size=Medium
🕹 State=Default
Disable=False
Icon Button=False
Loading=False
Show L Icon=False
Show R Icon=False
Subtitle=False
Dropdown=False

Anatomy

  1. Container. Fill, corner radius and shadow change with variant, tone and state.
  2. Left icon. Optional. 20px on Large, 16px on Medium and Small, 12px on Tiny.
  3. Label. Bold text style of the size.
  4. Subtitle. Optional, after the label, regular weight in the lighter on-color.
  5. Right icon. Optional, same size as the left icon.
  6. Dropdown arrow. Optional, for buttons that open a menu.

Variants

Solid buttons (Figma Type=Button) carry the main actions. Ghost buttons have no fill until hovered and suit secondary actions inside dense layouts. Ghost has no Information tone.

Sizes

SizeHeightPadding (y / x)RadiusTextIcon
large48px--layout-small / --layout-xlarge--radius-form-elementui/text lead/bold20px
medium40px--layout-tiny / --layout-default--radius-form-elementui/text/bold16px
small32px--layout-tiny / --layout-small--radius-form-element-smallui/text small/bold16px
tiny24px--layout-micro / --layout-tiny--radius-form-element-smallui/text small/bold12px

States

Each tone changes its own color family per state. Focus keeps the fill and adds a 3px outside line, except Primary, which lightens and shows the focus ring.

defaulthoverpressedfocusdisabledloading
primary
secondary
tertiary
success
error
warning
info
ghost primary
ghost secondary
ghost tertiary
ghost success
ghost error
ghost warning

Icon only

Round buttons with a single icon: 48px Large, 40px Medium, 32px Small, 24px Tiny.

Tokens

Tokens used by Button, per tone (X = primary, secondary, tertiary, success, error, warning, info).

StateFillTextShadow
Default--color-X--color-on-XPrimary, Tertiary: --shadow-button-default · Secondary: --shadow-button-secondary-default
Hover--color-X-natural--color-on-X—
Pressed--color-X-shade--color-on-X—
Focus--color-X (Primary: --color-X-tint)--color-on-XPrimary: --shadow-focus-primary · others: 3px line
Disabled--color-X-soft--color-X-tint—
Loading--color-X-soft—Loader: --color-X / --color-on-X

Notes from Figma

  • Loader sizes differ between variants in Figma (20, 24 or 16px for Medium). Code uses 24px for Large and Medium, 16px for Small and Tiny.
  • Tiny shows a 12px left icon but a 16px right icon in Figma. Code uses 12px for both.
  • Success Small and Tiny loading variants use the Tertiary soft fill in Figma. Code uses Success soft.
  • Ghost Tertiary uses tertiary/tertiary (white) for its label in Figma, which disappears on light surfaces. Code uses foreground/high-emphasis.

Figma to code

FigmaReact
🎛 Type = Button / Ghostvariant='solid' / 'ghost'
💅 Style = Primary … Informationtone='primary' … 'info'
👕 Size = Large / Medium / Small / Tinysize='large' / 'medium' / 'small' / 'tiny'
🕹 State = Hover / Pressed / Focus:hover / :active / :focus-visible
Disable = Truedisabled
Loading = Trueloading
Icon Button = Trueicon={…} aria-label="…"
Show L Icon / Show R IconiconLeft={…} / iconRight={…}
Subtitle = Truesubtitle="…"
Dropdown = Truedropdown