Components

View toggle

Two-button switch between list and grid layouts. Remembers the visitor's choice.

components/ui/ViewToggle.tsx

Live preview

Tokens it uses

--radius-control
px

Anything you click or type into.

In radius

--line

Dividers, input borders, chip borders, nav and footer rules.

In colors

--bg

Background behind every page.

In colors

--ink

Main text, headings and active nav links.

In colors

--ink-soft

Summaries, captions, inactive nav links, footer text.

In colors

--btn-bg

Solid buttons, and the border and hover fill of outline buttons.

In colors

--btn-ink

Text on solid buttons and selected chips.

In colors

Where it’s used

Works with

  • Filter chipsSits on the same row as the chips; same control radius, border and selected colours.
  • Playground rowChanges how Playground cards are laid out.

Shared tokens

These components share tokens with View toggle, so editing a shared token changes them together — that’s what keeps the interface cohesive.

  • Top barshares Page backgroundTextSecondary textHairlines and bordersButton fillButton textButtons, chips and inputs
  • Contact formshares Buttons, chips and inputsHairlines and bordersTextSecondary textButton fillButton text
  • Footershares Hairlines and bordersSecondary textButton fillButton textButtons, chips and inputs
  • Filter chipsshares Buttons, chips and inputsHairlines and bordersTextButton fillButton text
  • Project windowshares Page backgroundTextSecondary textHairlines and bordersButtons, chips and inputs
  • Contact linksshares TextSecondary textHairlines and bordersButtons, chips and inputs
  • Buttonshares Button fillButton textButtons, chips and inputs
  • Playground rowshares Hairlines and bordersTextSecondary text
  • Type testershares Hairlines and bordersTextSecondary text
  • Case study layoutshares TextSecondary textPage background
  • Project cardshares TextSecondary text
  • Your-version pillshares TextPage background
  • Back linkshares Secondary textText
  • Logo rowshares TextSecondary text
  • Say hishares TextSecondary text
  • Section introshares Text
  • Page headershares Secondary text