react-theme-select
v0.0.0
Published
Reusable React theme picker component.
Downloads
3
Readme
react-theme-select
Reusable React theme picker component.
Jump to the theme gallery.
Install
pnpm add react-theme-selectUsage
import { ThemeSelect, defaultPalettes } from "react-theme-select";
const themes = Object.keys(defaultPalettes);
<ThemeSelect
theme={theme}
setTheme={setTheme}
availableThemes={themes}
/>This component expects CSS variables for --background, --surface, --text, --border, --primary, --success, --warning, --danger, --info, and optionally --muted.
See examples/basic/README.md for a full working snippet.
Build
pnpm run buildThe build outputs ESM to dist/ and copies the CSS module alongside the JS output.
Theme gallery
Generate screenshots with:
pnpm run screenshotsIf Playwright browsers are missing:
pnpm exec playwright install chromium