Prateek Singhal

One switch. Every screen.

A design system I made for a B2B workspace where teams plan, assign and ship. Every value is a token, so Dark mode costs nothing. This page is built from it: try the switch at the top.

Open tasks128-12 this weekAcross 4 active projects
New task
Share
SRMKJDAP+5
Done
In review
At risk
Blocked
Beta
Task moved to DoneUndo

Token architecture

Components never touch a raw color

Three layers: primitives hold values, semantic tokens name a role, components use only the roles. Dark mode is the same component with its roles pointed at different primitives.

  • slate/0slate/900color/bg/surface
  • slate/900slate/50color/text/primary
  • slate/200slate/800color/border/default
  • violet/600violet/600color/bg/brand
Cycle time3.4 daysView cycleCycle time3.4 daysView cycle

The same frame, one mode switch

The example screen in Figma, built only from instances. Setting its Color collection to Dark re-themes all of it. Nothing is recolored by hand.

The Q4 Launch task screen in Light modeThe same screen in Dark modeLightDark

Accessible by default

17 of 17 pairs pass, in both modes

Every text and background pair the components use, measured in Light and Dark. WCAG AA asks for 4.5:1 for body text; the line marks it. The tightest is white on the dark brand hover, at 4.7.

PairLightDark
text/primarybg/surface
Aa17.7Light 17.7 to 1, passes AA
Aa16.3Dark 16.3 to 1, passes AA
text/secondarybg/surface
Aa6.9Light 6.9 to 1, passes AA
Aa9.9Dark 9.9 to 1, passes AA
text/tertiarybg/surface
Aa5.3Light 5.3 to 1, passes AA
Aa6.1Dark 6.1 to 1, passes AA
text/brandbg/surface
Aa6.2Light 6.2 to 1, passes AA
Aa7.8Dark 7.8 to 1, passes AA
text/primarybg/canvas
Aa17.1Light 17.1 to 1, passes AA
Aa17.6Dark 17.6 to 1, passes AA
text/secondarybg/subtle
Aa6.3Light 6.3 to 1, passes AA
Aa9.1Dark 9.1 to 1, passes AA
text/on-brandbg/brand
Aa6.2Light 6.2 to 1, passes AA
Aa6.2Dark 6.2 to 1, passes AA
text/on-brandbg/brand-hover
Aa8.0Light 8.0 to 1, passes AA
Aa4.7Dark 4.7 to 1, passes AA
text/on-brandbg/danger-solid
Aa5.2Light 5.2 to 1, passes AA
Aa5.2Dark 5.2 to 1, passes AA
text/inversebg/inverse
Aa17.7Light 17.7 to 1, passes AA
Aa16.3Dark 16.3 to 1, passes AA
text/brand-inversebg/inverse
Aa7.8Light 7.8 to 1, passes AA
Aa7.3Dark 7.3 to 1, passes AA
text/brandbg/selected
Aa5.5Light 5.5 to 1, passes AA
Aa7.3Dark 7.3 to 1, passes AA
text/successbg/success
Aa6.2Light 6.2 to 1, passes AA
Aa6.9Dark 6.9 to 1, passes AA
text/warningbg/warning
Aa5.5Light 5.5 to 1, passes AA
Aa6.9Dark 6.9 to 1, passes AA
text/dangerbg/danger
Aa6.5Light 6.5 to 1, passes AA
Aa6.3Dark 6.3 to 1, passes AA
text/infobg/info
Aa6.3Light 6.3 to 1, passes AA
Aa6.6Dark 6.6 to 1, passes AA
text/on-accentbg/accent
Aa14.6Light 14.6 to 1, passes AA
Aa13.3Dark 13.3 to 1, passes AA

34 components, 235 variants

Change one token. Watch everything follow.

These are the components, coded from the same tokens. Switch the mode or swap the brand primitive: one value changes, and every component that uses its role follows.

Color mode
Brand primitive

Button

New taskSecondaryGhostDeleteSmallDisabled

Text Field

Task nameWrite launch checklistKeep it short and specific.Search⌘K

Selection

Notify assigneesEvery weekAuto-assign new tasksBoardListTimeline

Badge

DoneIn reviewAt riskBlockedIn progressNew

Stat Card

On track86%31 of 36 milestones

Table

LOOP-1042Write launch checklistIn reviewSR
LOOP-1038Pricing page copyDoneMK
LOOP-1047Onboarding emailsAt riskJD

Alert and Toast

Cycle 12 starts MondayUnfinished tasks move to the new cycle.Task moved to DoneUndo

Progress and Spinner

Syncing tasks

Avatar Stack and Menu

SRMKJDAP+5RenameMove to projectDelete task

Loopwise UI

Then into code, on shadcn and Radix

Loopwise UI puts the tokens on shadcn, the Radix version, in a Next.js and Tailwind app: Button, Tabs and Dialog with every state, in Light and Dark. Below they run on the same Radix primitives, so try them, and try the mode switch too.

globals.css: shadcn’s names, Loopwise’s values
--primary: var(--lw-color-bg-brand);--primary-hover: var(--lw-color-bg-brand-hover);--destructive: var(--lw-color-bg-danger-solid);--ring: var(--lw-color-border-focus);--lw-dialog-enter: var(--lw-duration-base)  /* 200ms */;--lw-dialog-exit: var(--lw-duration-fast)  /* 120ms */;
Button, loading
Tabs, pill
Goals and progress.
Tabs, underline
Goals and progress.
Dialog
  • shadcn names point at Loopwise tokensAny shadcn component added later is on brand straight away.
  • Hover and pressed are named tokensDesigned for each theme and checked for contrast, not primary/80.
  • A loading button keeps its focus and widtharia-disabled instead of disabled, and the label stays in place, so nothing jumps.
  • One sliding tab indicatorIt shows where you came from. The bold width is reserved, so neighbors never move.
  • Dialog opens in 200ms, closes in 120msThe user has already decided to leave. Its motion has its own tokens.

Still open: motion tokens, button loading and tab focus and disabled states are in code but not in Figma yet, and screen readers, Safari and Firefox are not tested.

Version 0.1.0, complete

Foundations, components, documentation on every page, and one example screen in both modes. The library QA script reports zero issues on it.

195
tokens in 6 collections
34
components
235
variants
64
icons
22
text styles
0
QA issues

Five principles

  1. 01

    Tokens first

    Components bind every fill, stroke, gap, padding, radius and height to a variable. Nothing is a loose value.

  2. 02

    Dark mode for free

    Components use semantic tokens only, so switching the Color collection re-themes any frame.

  3. 03

    One component, many states

    States and sizes are variants; icons and text are properties. Nobody detaches to change something.

  4. 04

    Accessible by default

    Text pairs pass WCAG AA in both modes, focus is always visible, status never relies on color alone.

  5. 05

    Named for people

    Button, Badge, Page Header: the words the team already uses, with variants that read Property=Value.

Designed by me, produced with Claude

I set the brand, the token architecture, the component APIs and the standards, and wrote them down as rules. Claude built the file to those rules, one call at a time, and every release ends with a QA script and a Changelog row. The same way of working I use on Kinnect’s design system, here in a brand of my own.