Design system
Canonical reference for Sleeve’s visual language, tokens and UI patterns. Read this before adding pages, components or dialogs. Theme source of truth: src/index.css; accent presets: src/lib/settings.tsx.
Identity
Direction: dark “vinyl lounge” — warm analog accents, editorial typography, album art as the hero, Spotify-like navigation and density.
- Dark by default, with an optional warm light reading theme.
- Warm amber by default, with user-selectable accents.
- Surfaces are near-black with subtle white borders in dark mode, warm paper in light mode.
- Covers are square, prominent and use fallback art when CAA fails.
- Filled primary actions use the accent; everything else is quiet glass/secondary.
- Rounded, pill-heavy language for controls; rounded cards for surfaces.
Color tokens
Defined as Tailwind v4 theme variables in src/index.css.
| Token | Hex | Utility | Use |
|---|---|---|---|
ink-950 | #07080b | bg-ink-950 | Page background |
ink-900 | #0b0d11 | bg-ink-900 | Panels, dialogs |
ink-850 | #0e1116 | bg-ink-850 | Deep surfaces |
ink-800 | #12151c | bg-ink-800 | Raised surfaces |
ink-700 | #1a1f29 | bg-ink-700 | Controls/borders |
ink-600 | #252c3a | bg-ink-600 | Strong controls |
cream | #f3efe6 | text-cream | Primary text |
muted | #98a0ad | text-muted | Secondary text |
accent | #f4b860 | bg-accent / text-accent | Primary accent |
accent-soft | #ffd9a0 | text-accent-soft | Primary hover |
coral | #ef7d5b | bg-coral / text-coral | Secondary/warning accent |
Common transparent treatments:
- Borders:
border-white/10,border-white/[0.07],border-white/[0.06]. - Muted surfaces:
bg-white/[0.02],bg-white/[0.04]. - Hover:
border-white/20,bg-white/[0.08]. - Disabled:
disabled:opacity-50/disabled:pointer-events-none.
The light theme remaps ink-*, cream, muted, coral and the format chart tokens in src/index.css. It also maps the standard white-alpha utilities above onto dark alpha values, so new UI should reuse those ratios instead of new one-off colors. Media overlays on cover art keep fixed black/white values because the image stays dark in both themes. Use bg-ink-950/60, not bg-black/40, for neutral chips that must adapt.
Accent presets
Applied at runtime by setting --color-accent and --color-accent-soft on document.documentElement.
| Key | Label | Accent | Soft | Light | Light soft |
|---|---|---|---|---|---|
amber | Amber | #f4b860 | #ffd9a0 | #c2410c | #9a3412 |
coral | Coral | #ef7d5b | #ffb8a3 | #b0472b | #973b22 |
moss | Moss | #b9d97c | #daf0ac | #5c761f | #4f6718 |
sky | Sky | #7fb8f5 | #b9d9fb | #2e6cae | #245d99 |
lilac | Lilac | #c6a5ff | #e2d1ff | #7343c4 | #6236ad |
Accent glows:
.accent-glow— logo/compact glow..accent-glow-strong— floating mobile Add button..btn-primaryhas an accent-tinted shadow.
Do not hardcode amber in new components; use accent/accent-soft or CSS variables.
Semantic badge colors
Formats
| Format | Badge |
|---|---|
| CD | accent |
| Vinyl | coral |
| Cassette | sky |
| Digital | violet |
| Other | neutral white |
FormatBadge lives in src/components/release-card.tsx.
Wishlist priority
| Priority | Color |
|---|---|
| Low (1) | neutral |
| Medium (2) | accent |
| High (3) | coral |
Artist release-group types
| Type | Color |
|---|---|
| Album | accent |
| EP | sky |
| Single | neutral |
| Other | muted |
Data-viz format colors
CD var(--color-accent), Vinyl var(--color-coral), Cassette #7fb8f5, Digital #c6a5ff, Other rgba(255,255,255,0.35).
Typography
- Body: Inter, fallback system sans.
- Display/headings: Space Grotesk, fallback Inter/system.
- Fonts load from Google Fonts. Offline falls back to system fonts.
- Numeric stats use tabular numbers (
tabular-nums). - The UI copy is English, sentence case.
Typical scale:
| Role | Treatment |
|---|---|
| Page title | font-display text-4xl md:text-5xl font-semibold tracking-tight |
| Section title | font-display text-2xl font-semibold |
| Panel title | font-display text-base font-semibold |
| Body | text-sm |
| Metadata | text-[10px]/text-[11px], text-muted; use size/weight, not opacity, for hierarchy |
| Eyebrow | .eyebrow — 10px, uppercase, tracking-[0.24em], accent/80 |
| Field label | .field-label — 10px, uppercase, tracking-[0.16em], muted |
Do not introduce another display font or all-caps body copy.
Layout
Desktop shell
- Fixed sidebar:
264px(lg:pl-[264px]). - Sticky header with backdrop blur.
- Main max width:
1500px; page paddingpx-4 lg:px-10. - Page bottom padding protects the mobile nav:
pb-24/pb-28.
Sidebar
- Logo at top.
- Nav: Library, Discover, Wishlist, Insights, Settings.
- Active:
bg-white/[0.07] text-cream, accent icon. - “On the shelf” mini counts.
- Bottom “Grow the collection” CTA.
Mobile
- Sidebar hidden below
lg. - Bottom nav: 5 items — Library, Discover, Add (floating accent), Wishlist, Insights.
- Settings is reachable from the mobile header gear.
- Filters wrap; grids go 2 columns.
- Dialogs become bottom sheets (
rounded-t-3xl, full width) and switch to centered cards atsm. - Full-height fixed elements respect
pb-[env(safe-area-inset-bottom)]. - Page zoom is locked in the installed app (
user-scalable=noplustouch-action: pan-x pan-yand iOSgesturestartguards); Safari tabs stay zoomable for accessibility. - Form fields render at
16pxon coarse pointers so focusing them never triggers iOS autozoom.
Surfaces, radius and shadows
- Panels:
.panel—rounded-2xl border border-white/10 bg-ink-900/60. - Cards:
rounded-xl; covers are borderless. - Empty panels:
rounded-2xl. - Inputs:
rounded-xl. - Buttons/chips/selects: pill (
rounded-full). - Dialogs:
rounded-t-3xlmobile,sm:rounded-3xl. - Hover cards: full-card soft halo, no lift; covers do not zoom.
- Avoid bright white surfaces and heavy inner glows.
Background
- Base:
bg-ink-950. - Fixed radial accent wash top-right.
- Fixed coral wash top-left.
- 3% fractal-noise overlay via
body::before. - Do not add additional page-wide gradients.
Page headers and actions
Index pages — Library, Discover, Wishlist, Insights, Settings — use a plain header:
- Eyebrow with section icon.
- Display title.
- One short description line.
- Primary action left-aligned directly below the description, using
.btn-primary(accent fill).
Rules:
- Do not wrap index headers in gradient boxes, rounded cards or decorative vinyl backdrops.
- Keep one accent-filled action per header. Secondary actions can sit beside it as
.btn-secondary. - Supporting stats use the same number-and-label row directly below the actions.
- Detail pages (release, artist) may use a back link above their content panel.
- Do not add page-level back links to primary destinations; sidebar and mobile nav already provide navigation.
- Header actions and filters align consistently across pages: filters left, view controls right.
Discovery workflow
- Discover cards open a suggestion dialog. They do not open the Add release form.
- Listen on ListenBrainz sits under the recommendation reason as an underlined link.
- Dialog actions: Add to wishlist, Save for later, I already own it — Add to library.
- “I already own it — Add to library” opens the edition picker; never create a Release directly from Discover.
- Saved suggestions live in Discover, not Wishlist. Wishlist remains buy intent.
- Do not expose a manual Discover refresh button. Show
Updated …and refresh automatically; use album-oriented weekly/monthly sections.
Components
These classes live in src/index.css.
| Class | Purpose |
|---|---|
.btn + .btn-primary | Main action; accent fill, dark text |
.btn-secondary | Glass border action |
.btn-ghost | Quiet text action |
.btn-danger | Destructive action |
.icon-btn | 36px round icon action |
.input | Text/select/textarea field |
.select | Compact pill select |
.field-label | Form label |
.chip / .chip-active | Filter/status pill |
.panel | Standard surface |
.eyebrow | Section kicker |
.divider | 1px hairline |
.skeleton | Shimmer placeholder |
Buttons
- Primary: accent + ink text, rounded-full,
py-2.5. - Secondary: transparent glass with border.
- Ghost: text-only, muted until hover.
- Danger: red tint, never used for normal delete dialogs without confirmation.
- Compact buttons use
py-2 text-xs. - Icon-only controls must use
.icon-btnplusaria-label.
Forms
- Labels use
.field-label. - Inputs use
.input; focus: accent border + 2px accent ring. - Selects are pill-shaped in filters and standard inputs in forms.
- Price fields are
type="text"withinputMode="decimal"; parser accepts comma/dot. - Rating uses five star buttons, accent for filled.
- Validation errors are inline red/coral text; server errors surface via toast.
- No placeholder-only labels.
Global search
- The header search is a combobox: live results grouped into library releases, artists and wishlist.
- Debounce input; keep previous results visible while the next request runs.
- Keyboard:
Ctrl/⌘ Kfocuses, arrows move, Enter opens the active hit, Escape closes. - On the Library page the query is written to
qafter debounce; elsewhere typing never navigates until the user submits or picks a result. - Show cover art, title, artist and year; track-only matches label the matched track.
- Scope chips filter the dropdown: All, Library, Wishlist, Artists. Persist the chosen scope in
localStorage. - Recent searches appear when the empty input is focused; max 5, with a clear action.
- Highlight matched text with
<mark>using the accent token. - Free text searches title and artist only. Hidden metadata is operator-only:
artist:,label:,catalog:,year:,format:,track:,title:,genre:. Show active operators as chips. - Highlight matching is diacritic-insensitive (
bjorkmarksBjörk). - Wishlist hits expose an inline Add to library action; release hits expose Open artist. Rows stay single buttons; secondary actions are sibling controls.
- Mobile (
< sm) expands into a full-height sheet below the header with a close action. - Every result list has loading, empty and error states. Empty searches offer Search MusicBrainz.
Chips and filters
- Inactive: quiet border, muted text.
- Active: accent border/background/text.
- Chips are not buttons for destructive actions.
- Filter state lives in URL params on the Library page.
Cover art
- Always use
CoverArt; never raw<img>for CAA URLs. CoverArtrewrites CAA URLs to/api/coverfor disk/browser caching.- Covers are borderless. Do not add colored, white or hover borders around cover art.
- Loading/failure fallback: hue-derived dark gradient +
Disc3+ truncated title in small uppercase. - Hover: full-card soft halo, dark gradient overlay, accent circular action.
- Use lazy loading; do not render huge raw covers in lists.
- CAA 404 is common; show fallback and a Search match path on release pages.
Release cards and rows
- Grid cards: square cover, format badge top-left, hover action bottom-right, title/artist/year below.
- List rows: 48px cover, title/artist, year, format badge, rating, added date, chevron.
- Cards click through to
/releases/:id; do not nest links inside card buttons. - Artist/wishlist/discover cards reuse the same square-cover rhythm.
- Discover cards keep Album/EP type in the text block beside the year, not over the cover.
- All grid cards (library, wishlist, artist, Discover) use the same full-surface hover halo; covers do not zoom or lift.
- Wishlist grid cards reserve a fixed two-line note slot at the bottom, so cards with and without notes keep the same height. Long notes clamp with an ellipsis; the full text is available in the edit dialog.
Dialogs
Examples: Add release, wishlist add/edit, metadata enrich/match.
- Fixed overlay
bg-black/75 backdrop-blur-sm. role="dialog",aria-modal="true", descriptivearia-label.- Header: title, subtitle, close icon.
- Body scrolls independently; footer holds actions.
- Lock body scroll; close on Escape when safe.
- Mobile bottom-sheet, desktop centered.
- Width classes: standard form
max-w-lg, searchmax-w-2xl, add releasemax-w-5xl. - Do not nest dialogs.
- Confirmation for destructive actions is inline, two-step.
Toasts
- Fixed bottom-right desktop, above mobile nav on small screens.
- Success/error/info icon.
- Auto-dismiss; manual close.
- Use for async results and failures; do not use alerts.
Empty/loading/error states
- Every data view has all three.
- Empty: concentric vinyl illustration + title + description + primary action.
- Loading: skeletons matching final layout, not spinners alone.
- Error: short cause + retry; never expose raw stack traces.
- Inline warnings use
border-coral/20 bg-coral/[0.06].
Stats and data viz
- KPI cards: icon circle, uppercase hint, large display number, muted label.
- Horizontal bars: 2px/8px height, faint track, accent/coral fills.
- Monthly chart: 12 bars, accent gradient, min-height for zero values.
- Donut:
conic-gradientwith format colors; inner dark circle. - Ranked lists: subtle accent background proportional to value.
- Keep charts decorative but accurate; no chart library currently.
Navigation and metadata
- Icons: Lucide, stroke-based, 11–22px.
- Active nav uses accent icon, not accent background.
- Artist links in release/discover pages use quiet hover-to-cream text.
- Page eyebrows identify the section. Use back links on detail pages only; primary destinations rely on the sidebar and mobile nav.
Motion
- Standard interaction duration: 200ms.
- Hover halo: 200ms; overlays and actions: 300–500ms.
- Page/dialog entry:
animate-scale-in240ms, fade 200ms. - Drawer slide:
animate-slide-in260ms (kept for future panels). - Slow vinyl spin: 26s.
- Skeleton shimmer: 1.6s.
- No confetti, bouncing or attention-seeking loops.
Accessibility
Current requirements:
- Icon-only buttons have
aria-label. - Dialogs use
role="dialog"andaria-modal. - Cards/buttons are real
<button>/<a>elements. - Visible focus for inputs and card-like controls.
- Color is never the only signal: labels accompany format/priority badges.
- Images have
altor an accessible container label. - Keyboard: Escape closes dialogs; forms are keyboard reachable.
Known gaps to improve:
- Dialogs do not yet implement a full focus trap or restore focus.
- Toasts lack an explicit live region.
prefers-reduced-motionis not handled.- Some hover-only affordances rely on pointer hover; inline alternatives exist for critical actions.
- Contrast should be spot-checked when adding new muted text on dark surfaces.
Content rules
- Concise, human, record-shop tone.
- Sentence case for descriptions; uppercase only for eyebrows/labels/badges.
- Numbers use locale formatting; prices use the stored currency.
- Dates use locale display; date-only values are formatted in UTC.
- No emojis in product UI unless explicitly requested.
- Avoid technical jargon in user-facing copy.
Do / don’t
Do
- Use
panel,btn,input,chip,eyebrow. - Use album art as the dominant visual element.
- Use accent sparingly for action and emphasis.
- Use
CoverArtand the cover proxy. - Add loading, empty and error states.
- Check mobile and desktop.
- Keep one primary action per region.
- Put the primary page action on the left, accent-filled, below the header description.
- Keep covers borderless.
Don’t
- Introduce a new palette or font.
- Hardcode
#f4b860in components. - Use raw CAA image URLs.
- Add borders around cover art.
- Wrap index page headers in gradient boxes or vinyl decorations.
- Nest buttons/links inside card buttons.
- Add autoplay/audio affordances before playback exists.
- Add comments or decorative animation that does not clarify state.
- Use square buttons or heavy borders.
Adding new UI
New page
- Create
src/pages/<page>.tsx. - Reuse the plain page header pattern: eyebrow, display title, description and a left-aligned accent primary action. Add a back link only on detail pages.
- Use
panel,chip,btnrather than new primitives. - Register the route in
src/App.tsx. - Add nav entry only if it is a primary destination.
- Lazy-load heavy tools (see
/import/csv). - Check mobile + desktop.
New dialog
- Copy the overlay/panel/header/footer pattern from an existing dialog.
- Add
role="dialog",aria-modal,aria-label. - Lock body scroll; close on Escape.
- Provide loading/disabled/error states.
- Use max width based on complexity:
lgform,2xlsearch,5xlfull add flow. - Do not nest dialogs.
New card
- Square cover +
CoverArt+ format badge. - Hover lift and overlay action.
- Title, artist, then 10–11px metadata.
- Use one action: open details/apply/add. For multiple actions, separate sibling controls, not nested buttons.
File map
- Tokens/components/animations:
src/index.css - Accent presets and settings:
src/lib/settings.tsx - Cover proxy rendering:
src/components/cover-art.tsx - Format badge/rating/cards:
src/components/release-card.tsx - Shell/navigation:
src/components/sidebar.tsx,header.tsx,mobile-nav.tsx - Dialogs:
src/components/*dialog*.tsx - Empty/skeleton patterns:
src/components/empty-state.tsx, page-level skeletons - Toasts/offline:
src/components/toast.tsx,offline-banner.tsx