Sami Vuori Design system Back to site →

Button

The only button on the site. A link when it has an href, otherwise a <button>.

On the cream page the fill is accent-main, as on Contact
<ul style="--color-button-fill: var(--color-accent-main)">
  <Button href="mailto:…">Email me</Button>
  <Button href={site.cvUrl} variant="ghost" external>CV</Button>
</ul>

Variants

Behaviour

Props

PropTypeDefaultDescription
href string — Renders an <a>; without it a <button>.
variant 'primary' | 'ghost' 'primary' Visual style.
external boolean false Opens in a new tab and shows ↗.
arrow boolean external, mailto or play Force the icon on or off.
icon 'arrow' | 'play' 'arrow' ↗ for links out, ▶ for media that plays on the page.
…rest attributes — aria-label, title, type… are passed through.

Tokens

Token Base≥ 1440 Note
--button-py var(--spacing-sm)var(--spacing-md)
--button-px var(--spacing-md)var(--spacing-lg)
--type-button-size 16px22px
--button-letter-spacing 0.04em0.05em
--color-button-primary-bg var(--color-bg-inverse)
--color-button-primary-fg var(--color-text-on-dark)
--color-button-fill var(--color-text-on-dark) cream wipe (all buttons) …
--color-button-fg-hover var(--color-text-primary) … with black text
--motion-nudge-icon 2px button arrow ↗ on hover