Skip to content

Theme Picker

Pro

Pick light, dark, system, or an app theme from cards that show a small app in each one. The page switches with a short motion, such as a circle that grows.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Theme Picker needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
17
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

With no children it shows Light, Dark, and System. Add a ThemePickerItem for each app theme.

appearance-settings.tsx

ThemePickerPreview

<span>
PropTypeDefaultDescription
themeRequiredstring—The theme to draw. system draws the light theme with the dark theme over its inline-end half. The theme reaches the box through the picker attribute (class="ocean"), so the theme CSS must work on any element, not only on :root (.ocean { --background: … }).
systemThemesreadonly [light: string, dark: string]DEFAULT_SYSTEM_THEMESThe light and dark themes of a system preview. Default ["light", "dark"].
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

ThemePickerItem

<span>
PropTypeDefaultDescription
childrenReactNode—The parts of the card: ThemePickerItemBox and ThemePickerItemLabel. Default: the box with the drawn app, and the label with the default caption.
classNamestring—
valueRequiredstring—The theme name: next-themes gets it on a check.
From Base UIRadio.RootBase UI docs
disabledboolean—Whether the component should ignore user interaction.
requiredboolean—Whether the user must choose a value before submitting a form.
readOnlyboolean—Whether the user should be unable to select the radio button.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

ThemePickerItemBox

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

ThemePickerItemLabel

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

ThemePickerItemCaption

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

ThemePickerItemDescription

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

ThemePicker

<div>
PropTypeDefaultDescription
childrenReactNode—The cards. Default: Light, Dark, and System.
classNamestring—
valuestring | null—The theme, for a controlled picker or another theme store; null checks no card (a required form field with no choice yet). Default: next-themes theme.
onValueChange—Called with the new theme inside the page change. Without value, next-themes gets it too. Update the page synchronously here: the page change takes its picture when this call returns.
transition"blinds""blur""circle""diagonal""fade""none""wipe""circle"The page change when the look changes. Default circle, from the press point.
size"default""lg""sm""default"Cards at least 120, 160, or 208px wide.
attribute"class" | `data-${string}`"class"How a preview puts its theme on its box, as next-themes attribute. Default class.
labels—The group name and the default captions. Keep the object stable (a module constant).
From Base UIRadioGroupBase UI docs
disabledbooleanfalseWhether the component should ignore user interaction.
readOnlybooleanfalseWhether the user should be unable to select a different radio button in the group.
requiredbooleanfalseWhether the user must choose a value before submitting a form.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it in a settings page, where there is room for a preview of each theme.
  • Add one ThemePickerItem per app theme: each card draws itself with the colors of its theme.
  • Use ThemePickerItemDescription for a second line under the caption.
  • Pass value and onValueChange to keep the theme in your own store.
  • For a small light and dark switch in a header, use a Theme Switch.
  • For a choice that is not a theme, use a Radio Group.
TabMoves focus to the checked card. The group is one tab stop.
Arrow keysChecks the next or the previous card and changes the theme.

It is a Base UI Radio Group named "Theme" (change it with labels or aria-label). Each card is a radio named by its caption.

A ThemePickerItemDescription describes its radio (aria-describedby).

The preview is aria-hidden: the caption is the name, not the drawn app.

The checked card shows a ring outside the preview and a filled radio circle, so the check reads on every theme.

Check and hover
fade · 150ms · ease-out (0, 0, 0.2, 1)
Page change
theme · 450ms · ease-panel (0.2, 0.4, 0.2, 1) · the new theme grows in a circle from the press
  1. AddedTheme Picker.
Open the release