Components

Components

Compare two implementations that consume the same @ghds/tokens — a React component and a Lit web component — side by side on one screen. Color, spacing, radius, and typography come from the tokens, and the hand-drawn outlines come from @ghds/sketch-core. Toggle dark mode in the top-right corner and both respond identically.

React @ghds/react

Button

Input

Card

Lit @ghds/web-components

Button

Primary Delete Cancel Disabled

Input

Card

Default sketch outline, no elevation.

Drop-shadow sketch outline suggests elevation.

Cross-Framework, Single Token Source

The two columns use different runtimes (React's virtual DOM vs. native custom elements), but the visual result is identical. This is why tokens are kept as the single source of truth — change a value in one place, and every framework changes with it.

Component Documentation

Anatomy, variants & states, accessibility, props, and a live demo for each component: