Components and page patterns¶
UI kit (src/components/ui)¶
shadcn-style components on Radix UI primitives, styled with Tailwind and class-variance-authority. 17 components:
| Component | Notes |
|---|---|
button |
variants default, destructive, outline, secondary, ghost, link; sizes default (h-10), sm, lg, icon |
input, textarea, label, select, checkbox, switch |
form controls |
dialog, alert-dialog, sheet, dropdown-menu |
overlays; sheet is the right-hand side panel |
tabs, card, badge, avatar, progress |
layout and status |
table |
the grab-to-scroll table |
Use the cn() helper (@/lib/utils) to merge class names. The @ alias points at src/.
Page patterns¶
| Pattern | What it is | Examples |
|---|---|---|
| List page | title and description (S.pageTitle, S.pageDesc), a header row with the primary button (S.btnNew), filters, then a table |
Channels, Playlists, Campaigns |
| Side sheet | a panel from the right for create and detail; stepped sheets show Step n / N and a Next button |
CreateCampaignSheet, CampaignDetailSheet, createsheet/* |
| Picker sheet | choose an item from a list inside another flow | PlaylistPickerSheet, pickersheet/MediaPickerSheet, LayoutPickerSheet |
| Detail page | title, tabs, sections (st styles) |
device detail, group detail |
| Status chip | rounded label with a tone from a map (live, scheduled, paused, draft ...) | Campaigns |
Shared style objects (from @playtelly/tellyboard-theme): S for list pages and st for detail pages (buttons btnNew, btnPrimary, btnSave, btnOutline,
btnDanger, btnBack, btnIcon, btnLink; headers, containers, centered states), sidebarTheme(primary) and broadcastSheetStyle (the live-announcement side sheet).
Icons and fonts¶
- Icons:
lucide-react. - Fonts: Hanken Grotesk (text), IBM Plex Mono (ids and code).
Conventions¶
- New code imports colours and styles from
@playtelly/tellyboard-theme, not from the localtheme/copy. - Do not hard-code hex colours; use
C.*or the Tailwind semantic classes so dark mode works. - Keep sizes in one scale: list-page padding
24px 32px, field height 40 px, 11 px uppercase table headers. - Anything that talks to the backend goes through
src/utils/api.js.