banira theme

Scaffold a light/dark theme contract, a component, and a demo page — token sets via custom properties, switched by data-theme and prefers-color-scheme.

Usage

$ banira theme [dir] [options]

Arguments

ArgumentDescription
[dir]Directory to scaffold into. (default: .)

Options

OptionDescription
--forceOverwrite existing files.
--tag <tag-name>Tag name for the toggle component. (default: theme-toggle)
--tokens <tokens.json>Seed the light :root token set from a DTCG document.

Examples

scaffold a theme
$ banira theme src/theme
seed from design tokens
$ banira theme src/theme --tokens design.tokens.json

Notes

Generates theme.css (a light/dark contract where an explicit data-theme="light" wins over the OS preference), a <theme-toggle> that flips data-theme and persists the choice, and a no-flash demo page.