Skip to content

Theme Picker

Switch between data-theme presets with round color swatches or a labelled list, on <html> or any element, and optionally remember the choice.

Installation

pnpm dlx shadcn@latest add @portfolio-kit/theme-picker
First time? Add the @portfolio-kit registry to components.json
components.json
{
  "registries": {
    "@portfolio-kit": "https://www.parthjadhav.com/products/portfolio-kit/r/{name}.json"
  }
}

Usage

Examples

List

The list variant adds names and one-line descriptions — at home in a settings panel or a header dropdown. Pass swatches to show fixed colors instead of reading CSS variables.

Scoped Preview

Point target at an element to theme just that element — handy for “try it” previews. The rest of the page is untouched.

API Reference