Repository navigation
Getting Started
Spotstrap is your brand as a theme: one CSS file with the tokens shadcn's components read
(--background, --primary, --radius…), in light and dark. It ships no components: use your
framework's shadcn port, and it looks like your brand as it is.
For shadcn/ui (React), shadcn-vue or shadcn-svelte:
pnpm add @kodentuzo/spotstrap/* your main CSS file */
@import "tailwindcss";
@import "@kodentuzo/spotstrap/tailwind.css";
@import "@kodentuzo/spotstrap/themes/neutral.css";tailwind.css gives shadcn's components their variable names, colors the page and sets
border and focus colors. Add components with your port's CLI as usual.
To follow a .dark class on <html> instead of the system's light or dark setting (for a
theme toggle), add:
@import "@kodentuzo/spotstrap/dark-class.css";Link one theme, from npm or a CDN:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@kodentuzo/spotstrap/dist/themes/neutral.css" />It sets every token under shadcn's name (--primary) and Tailwind's (--color-primary), so CSS
written for shadcn's tokens, such as Basecoat, reads it as it is.
Colors follow the system's light or dark setting, or a dark or light class on <html>.
Everything is in the theme layer, so your own CSS wins without !important.
See React Native.
neutral is the default. The others are presets for kodentuzo, librevitalis, librelifts,
spotcraft, sokobanko, tagtape and vinskiano. Themes name fonts but don't load them: load the
font files yourself, for example with Fontsource.
Colors outside CSS (meta theme-color, favicons, manifests, canvas code) come from
@kodentuzo/spotstrap/tokens.json, with each color as oklch and hex.
-
Replace, don't stack. Remove the app's
:root/.darkcolor blocks and its@theme inlinemappings; spotstrap's theme defines the same names. -
Default borders use
--color-border. A bareborderthat used to take the text color is now the theme's subtle border; writeborder-foregroundwhere you want it dark. - Fonts are named, not loaded. Load the font files yourself.
-
Unprefixed names are taken. spotstrap defines shadcn's
--background,--muted,--accent,--borderand the rest. If your CSS used--mutedfor text or--accentfor a brand color, rename all of them in one change. -
Your own tokens (a game board's colors, a chart's) go in your CSS next to the theme:
@themefor ones Tailwind should make utilities from,:roototherwise. Withdark-class.css, give their dark values under.dark. -
Focus outlines use the ring color at 50%. A high-contrast theme that wants them solid
sets
outline-color: var(--color-ring)in its own base layer. -
shadcn's
dark:bg-destructive/60turns gray in a black-and-white theme, where destructive is white. Usebg-destructive text-destructive-foregroundinstead. -
pnpm's
minimumReleaseAgeholds back fresh releases. For your own packages, add them tominimumReleaseAgeExclude; their provenance is still checked.
Published from docs/. Edit the files there; changes here are overwritten.