Tokens
These examples do not call the service. Model rendering is a static placeholder.
Source commit: d204666f04a0ee7b6f18543f8aec414b4128874e · shadcn build 4.23.1
Noto Sans JP · @fontsource/noto-sans-jp 5.3.1 · OFL-1.1
Preview
Install (publication pending)
These URLs are planned for publication and are not available yet. Inspect existing file differences before installing; do not use --overwrite by default.
npx shadcn@latest add https://spritestack.dev/r/spst-theme.jsonAdd to registries in components.json
{"registries":{"@spritestack":"https://spritestack.dev/r/{name}.json"}}npx shadcn@latest add @spritestack/spst-themeTargets React 19, Tailwind v4 and shadcn projects with src/. Layouts without src/ are unverified. Installation copies source files; updates are not automatic.
import "./styles/spritestack/theme.css";
<div className="spst-theme" data-theme="light">
{/* Render components here. */}
</div>Pass an element inside .spst-theme to container / portalContainer for portals. Self-host Noto Sans JP weights 400, 600 and 700 in your application; system-ui is the fallback.
Dependencies
No external dependencies
Props / API
Generated by parsing the actual source. Rows marked … reference inherited React / Radix public types. — means no default is declared in this function parameter. See the type declarations for union-specific requirements.
Provides CSS variables; no React props or events.
Accessibility requirements
- Give inputs a label or accessible name and associate errors with aria-describedby. Do not communicate state using color alone.
- Provide model names and image fallbacks. Icon-only buttons need accessible names.
- Provide dialog and sheet titles and descriptions, and place portals inside the theme. Test Tab, arrow keys, Escape and focus restoration in the consuming app.
- Slider requires a name and finite min < max. ToggleGroup requires a nonempty single value. The parent controls pending state.
Reference images: 01–11 · Dark mode and error states extend the reference design.
Measured and adopted values
Measurements and coordinates come from design §3.3; adopted values are read directly from tokens.css.
| Token | Image / rectangle | Measured | Light | Dark |
|---|---|---|---|---|
--spst-background | 01: 600,70,650,90 | #f0f6fe | #f0f6fe | #151e30 |
--spst-card | 01: 1100,650,1150,675 | #fafbfe | #fafbfe | #1a263c |
--spst-foreground | 01: 58,110,510,140 | #1a263c | #1a263c | #f0f6fe |
--spst-muted-foreground | 04: 1000,321,1435,341 | #384b67 | #384b67 | #bbc2ce |
--spst-primary | 01: 1100,765,1150,785 | #255ab1 | #255ab1 | #b3c5e4 |
--spst-primary-foreground | 01: 1225,766,1360,785 | #ffffff | #ffffff | #1a263c |
--spst-border | 01: 1063,200,1064,400 | #d2dcea | #d2dcea | #384b67 |
--spst-input | 07: 241,305,242,322 | #9cacca | #6d7c97 | #9aa3b0 |
--spst-ring | 01: 29,290,31,450 | #1c4db0 | #1c4db0 | #b0c1e3 |
--spst-selected | 10: 140,280,460,300 | #ccdffd | #ccdffd | #384b67 |
--spst-attention-foreground | 06: 460,498,540,520 | #080b28 | #080b28 | #ccdffd |
--spst-attention | 10: 140,280,460,300 | #ccdffd | #ccdffd | #080b28 |
--spst-success | 07: 370,506,378,520 | #d6f2dd | #d6f2dd | #093115 |
--spst-success-foreground | 07: 382,505,455,526 | #093115 | #093115 | #d6f2dd |
--spst-stage | 03: 90,200,160,260 | #f2f7fd | #f2f7fd | #1a263c |
--spst-grid | 03: 205,380,260,420 | #c4d3ef | #c4d3ef | #384b67 |
--spst-radius-card | Approximation / design value, §3.6 | — | 14px | 14px |
--spst-radius-button | Approximation / design value, §3.6 | — | 12px | 12px |
--spst-radius-input | Approximation / design value, §3.6 | — | 12px | 12px |
--spst-radius-badge | Approximation / design value, §3.6 | — | 999px | 999px |
--spst-shadow-card | Approximation / design value, §3.6 | — | 0 1px 3px rgb(26 38 60 / 0.06) | 0 1px 3px rgb(26 38 60 / 0.06) |
--spst-shadow-popover | Approximation / design value, §3.6 | — | 0 4px 12px rgb(26 38 60 / 0.12) | 0 4px 12px rgb(26 38 60 / 0.12) |
--spst-overlay | Approximation / design value, §3.6 | — | rgb(26 38 60 / 0.4) | rgb(26 38 60 / 0.4) |
--spst-font-sans | Approximation / design value, §3.6 | — | "Noto Sans JP", system-ui, sans-serif | "Noto Sans JP", system-ui, sans-serif |
--spst-font-mono | Approximation / design value, §3.6 | — | ui-monospace, SFMono-Regular, Menlo, Consolas, monospace | ui-monospace, SFMono-Regular, Menlo, Consolas, monospace |
--spst-text-sm | Approximation / design value, §3.6 | — | 0.875rem | 0.875rem |
--spst-text-sm-line-height | Approximation / design value, §3.6 | — | 1.5 | 1.5 |
--spst-text-base | Approximation / design value, §3.6 | — | 1rem | 1rem |
--spst-text-base-line-height | Approximation / design value, §3.6 | — | 1.7 | 1.7 |
--spst-text-lg | Approximation / design value, §3.6 | — | 1.25rem | 1.25rem |
--spst-text-lg-line-height | Approximation / design value, §3.6 | — | 1.5 | 1.5 |
--spst-text-xl | Approximation / design value, §3.6 | — | 1.75rem | 1.75rem |
--spst-text-xl-line-height | Approximation / design value, §3.6 | — | 1.4 | 1.4 |
--spst-text-display | Approximation / design value, §3.6 | — | 2.25rem | 2.25rem |
--spst-text-display-line-height | Approximation / design value, §3.6 | — | 1.25 | 1.25 |
--spst-text-display-narrow | Approximation / design value, §3.6 | — | 1.75rem | 1.75rem |
--spst-font-weight-body | Approximation / design value, §3.6 | — | 400 | 400 |
--spst-font-weight-control | Approximation / design value, §3.6 | — | 600 | 600 |
--spst-font-weight-heading | Approximation / design value, §3.6 | — | 700 | 700 |
--spst-focus-width | Approximation / design value, §3.6 | — | 2px | 2px |
--spst-focus-offset | Approximation / design value, §3.6 | — | 2px | 2px |
--spst-space-1 | Approximation / design value, §3.6 | — | 0.25rem | 0.25rem |
--spst-space-2 | Approximation / design value, §3.6 | — | 0.5rem | 0.5rem |
--spst-space-3 | Approximation / design value, §3.6 | — | 0.75rem | 0.75rem |
--spst-space-4 | Approximation / design value, §3.6 | — | 1rem | 1rem |
--spst-space-5 | Approximation / design value, §3.6 | — | 1.5rem | 1.5rem |
--spst-space-6 | Approximation / design value, §3.6 | — | 2rem | 2rem |
--spst-space-7 | Approximation / design value, §3.6 | — | 3rem | 3rem |
--spst-space-8 | Approximation / design value, §3.6 | — | 4rem | 4rem |
Contrast ratios
| Foreground / background | Light | Dark | Minimum |
|---|---|---|---|
| foreground / background | 13.93:1 | 15.33:1 | 4.5:1 |
| foreground / card | 14.64:1 | 13.93:1 | 4.5:1 |
| foreground / selected | 11.21:1 | 8.15:1 | 4.5:1 |
| foreground / stage | 14.06:1 | 13.93:1 | 4.5:1 |
| muted-foreground / background | 8.15:1 | 9.30:1 | 4.5:1 |
| muted-foreground / card | 8.56:1 | 8.45:1 | 4.5:1 |
| muted-foreground / selected | 6.56:1 | 4.94:1 | 4.5:1 |
| primary / background | 6.08:1 | 9.54:1 | 4.5:1 |
| primary / card | 6.39:1 | 8.67:1 | 4.5:1 |
| primary / selected | 4.89:1 | 5.07:1 | 4.5:1 |
| primary-foreground / primary | 6.61:1 | 8.67:1 | 4.5:1 |
| attention-foreground / attention | 14.27:1 | 14.27:1 | 4.5:1 |
| success-foreground / success | 12.04:1 | 12.04:1 | 4.5:1 |
| input / background | 3.88:1 | 6.54:1 | 3:1 |
| input / card | 4.08:1 | 5.94:1 | 3:1 |
| input / selected | 3.12:1 | 3.48:1 | 3:1 |
| ring / background | 7.06:1 | 9.19:1 | 3:1 |
| ring / card | 7.41:1 | 8.35:1 | 3:1 |
| ring / selected | 5.68:1 | 4.89:1 | 3:1 |
| primary / background | 6.08:1 | 9.54:1 | 3:1 |
| primary / card | 6.39:1 | 8.67:1 | 3:1 |
Building dark mode
These are design values, not measurements of dark reference images. Swap light background and foreground roles; mix primary and focus colors 65% toward white, background 20% from light foreground toward black, muted text 25% and input borders 40% from light background toward foreground. Interpolate sRGB channels and round to integers. Radii, spacing, shadows and text sizes are shared.