Skip to content
This page is a translation of the Japanese version. The Japanese version is authoritative; if they differ, follow the Japanese version.

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

Open full page

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.json

Add to registries in components.json

{"registries":{"@spritestack":"https://spritestack.dev/r/{name}.json"}}
npx shadcn@latest add @spritestack/spst-theme

Targets 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.

    TokenImage / rectangleMeasuredLightDark
    --spst-background01: 600,70,650,90#f0f6fe#f0f6fe#151e30
    --spst-card01: 1100,650,1150,675#fafbfe#fafbfe#1a263c
    --spst-foreground01: 58,110,510,140#1a263c#1a263c#f0f6fe
    --spst-muted-foreground04: 1000,321,1435,341#384b67#384b67#bbc2ce
    --spst-primary01: 1100,765,1150,785#255ab1#255ab1#b3c5e4
    --spst-primary-foreground01: 1225,766,1360,785#ffffff#ffffff#1a263c
    --spst-border01: 1063,200,1064,400#d2dcea#d2dcea#384b67
    --spst-input07: 241,305,242,322#9cacca#6d7c97#9aa3b0
    --spst-ring01: 29,290,31,450#1c4db0#1c4db0#b0c1e3
    --spst-selected10: 140,280,460,300#ccdffd#ccdffd#384b67
    --spst-attention-foreground06: 460,498,540,520#080b28#080b28#ccdffd
    --spst-attention10: 140,280,460,300#ccdffd#ccdffd#080b28
    --spst-success07: 370,506,378,520#d6f2dd#d6f2dd#093115
    --spst-success-foreground07: 382,505,455,526#093115#093115#d6f2dd
    --spst-stage03: 90,200,160,260#f2f7fd#f2f7fd#1a263c
    --spst-grid03: 205,380,260,420#c4d3ef#c4d3ef#384b67
    --spst-radius-cardApproximation / design value, §3.6—14px14px
    --spst-radius-buttonApproximation / design value, §3.6—12px12px
    --spst-radius-inputApproximation / design value, §3.6—12px12px
    --spst-radius-badgeApproximation / design value, §3.6—999px999px
    --spst-shadow-cardApproximation / design value, §3.6—0 1px 3px rgb(26 38 60 / 0.06)0 1px 3px rgb(26 38 60 / 0.06)
    --spst-shadow-popoverApproximation / design value, §3.6—0 4px 12px rgb(26 38 60 / 0.12)0 4px 12px rgb(26 38 60 / 0.12)
    --spst-overlayApproximation / design value, §3.6—rgb(26 38 60 / 0.4)rgb(26 38 60 / 0.4)
    --spst-font-sansApproximation / design value, §3.6—"Noto Sans JP", system-ui, sans-serif"Noto Sans JP", system-ui, sans-serif
    --spst-font-monoApproximation / design value, §3.6—ui-monospace, SFMono-Regular, Menlo, Consolas, monospaceui-monospace, SFMono-Regular, Menlo, Consolas, monospace
    --spst-text-smApproximation / design value, §3.6—0.875rem0.875rem
    --spst-text-sm-line-heightApproximation / design value, §3.6—1.51.5
    --spst-text-baseApproximation / design value, §3.6—1rem1rem
    --spst-text-base-line-heightApproximation / design value, §3.6—1.71.7
    --spst-text-lgApproximation / design value, §3.6—1.25rem1.25rem
    --spst-text-lg-line-heightApproximation / design value, §3.6—1.51.5
    --spst-text-xlApproximation / design value, §3.6—1.75rem1.75rem
    --spst-text-xl-line-heightApproximation / design value, §3.6—1.41.4
    --spst-text-displayApproximation / design value, §3.6—2.25rem2.25rem
    --spst-text-display-line-heightApproximation / design value, §3.6—1.251.25
    --spst-text-display-narrowApproximation / design value, §3.6—1.75rem1.75rem
    --spst-font-weight-bodyApproximation / design value, §3.6—400400
    --spst-font-weight-controlApproximation / design value, §3.6—600600
    --spst-font-weight-headingApproximation / design value, §3.6—700700
    --spst-focus-widthApproximation / design value, §3.6—2px2px
    --spst-focus-offsetApproximation / design value, §3.6—2px2px
    --spst-space-1Approximation / design value, §3.6—0.25rem0.25rem
    --spst-space-2Approximation / design value, §3.6—0.5rem0.5rem
    --spst-space-3Approximation / design value, §3.6—0.75rem0.75rem
    --spst-space-4Approximation / design value, §3.6—1rem1rem
    --spst-space-5Approximation / design value, §3.6—1.5rem1.5rem
    --spst-space-6Approximation / design value, §3.6—2rem2rem
    --spst-space-7Approximation / design value, §3.6—3rem3rem
    --spst-space-8Approximation / design value, §3.6—4rem4rem

    Contrast ratios

    Foreground / backgroundLightDarkMinimum
    foreground / background13.93:115.33:14.5:1
    foreground / card14.64:113.93:14.5:1
    foreground / selected11.21:18.15:14.5:1
    foreground / stage14.06:113.93:14.5:1
    muted-foreground / background8.15:19.30:14.5:1
    muted-foreground / card8.56:18.45:14.5:1
    muted-foreground / selected6.56:14.94:14.5:1
    primary / background6.08:19.54:14.5:1
    primary / card6.39:18.67:14.5:1
    primary / selected4.89:15.07:14.5:1
    primary-foreground / primary6.61:18.67:14.5:1
    attention-foreground / attention14.27:114.27:14.5:1
    success-foreground / success12.04:112.04:14.5:1
    input / background3.88:16.54:13:1
    input / card4.08:15.94:13:1
    input / selected3.12:13.48:13:1
    ring / background7.06:19.19:13:1
    ring / card7.41:18.35:13:1
    ring / selected5.68:14.89:13:1
    primary / background6.08:19.54:13:1
    primary / card6.39:18.67:13: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.