Skip to content

Getting Started

github-actions[bot] edited this page Nov 21, 2026 · 1 revision

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.

With Tailwind v4 and a shadcn port

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";

Without Tailwind

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.

React Native

See React Native.

Themes

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.

Moving an existing shadcn app

  • Replace, don't stack. Remove the app's :root / .dark color blocks and its @theme inline mappings; spotstrap's theme defines the same names.
  • Default borders use --color-border. A bare border that used to take the text color is now the theme's subtle border; write border-foreground where 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, --border and the rest. If your CSS used --muted for text or --accent for 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: @theme for ones Tailwind should make utilities from, :root otherwise. With dark-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/60 turns gray in a black-and-white theme, where destructive is white. Use bg-destructive text-destructive-foreground instead.
  • pnpm's minimumReleaseAge holds back fresh releases. For your own packages, add them to minimumReleaseAgeExclude; their provenance is still checked.

What to read next

  • Themes: every preset and its contrast.
  • Decisions: why spotstrap works the way it does.

Clone this wiki locally