Using the components

Where the shared components live and how the website uses them.

Every component in the catalog is the website's own code. Components live in packages/ui (@sr/ui) in the stage-reference repo. The website (web/) imports them, and each catalog entry here renders the same component with the site's Tailwind styles and theme tokens (packages/ui/src/theme.css). Change a component once and both update.

ComponentSource (packages/ui/src/)Used on
SiteHeader, SiteFootersite-header.tsx, site-footer.tsxEvery page (web/src/app/layout.tsx)
PageHero, StatsStrippage-hero.tsx, stats-strip.tsxHome
LinkCardlink-card.tsxHome sections, Dancer Resources topics
SectionCardsection-card.tsxCity lists, club profile, legal entries, cases
ClubCardclub-card.tsxState pages, club search
FieldRowfield-row.tsxClub profile
Chip, PermitChipchip.tsx, permit-chip.tsxClub status, legal entries, members markers
LockedPanellocked-panel.tsxClub profile, legal pages, rights
LegalMaplegal-map.tsxLegal Map
Buttonbutton.tsxEverywhere

Adding a component

  1. Add packages/ui/src/<name>.tsx and export it from index.ts. Take a LinkComponent prop for links.
  2. Use it in web/ (the site passes next/link through web/src/components/ui.tsx).
  3. Add a catalog entry in design-system/components/<name>/: a thin wrapper <Name>.tsx and <name>.handoff.ts with previews.