Components
View toggle
Two-button switch between list and grid layouts. Remembers the visitor's choice.
components/ui/ViewToggle.tsxLive preview
Tokens it uses
--radius-controlpx
Anything you click or type into.
--lineDividers, input borders, chip borders, nav and footer rules.
--bgBackground behind every page.
--inkMain text, headings and active nav links.
--ink-softSummaries, captions, inactive nav links, footer text.
--btn-bgSolid buttons, and the border and hover fill of outline buttons.
--btn-inkText on solid buttons and selected chips.
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