DensityToggle
Persisted, synced, phone-clamped.
npx shadcn add @lopifi/density-toggleHow it behaves
What it renders, what it refuses to render, and why. The same paragraphs as the family spec, so the two can’t disagree.
compact / default / comfortable. Persisted per user and synced across devices. Clamped to comfortable on phone whatever the stored preference, because 32px rows with 13px text fail both touch targets and arm's-length legibility.
Sets data-density on a container; every list component reads it.
More in System & states
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section DensityToggle renders in, the calculators behind its figures, and the ledger payloads that feed it.
- DensityToggle, runningThe tables showcase — live, with theme, density, grayscale and reduced-motion switches.
- System & statesEmpty, error, loading, stale and confirm states. They decide whether a product feels finished. Specs for 9 React components: EmptyState, ErrorState, Skeleton, StaleIndicator and 5 more.