Skip to content

Color Scheme Select

InputMIT
View in Storybook

Color palette picker dropdown — switch between branded color schemes.

bun add @otfdashkit/ui

Preview

Color Scheme Select
Loading Storybook preview…

Code

import { ColorSchemeSelect, Body, Caption } from '@otfdashkit/ui'

export function Example() {
  return (
    <div className="space-y-3 w-72">
      <Caption>Pick a palette</Caption>
      <ColorSchemeSelect />
      <Body size="sm" tone="muted">
        Sets a <code>theme-*</code> class on <code>&lt;html&gt;</code>. Persists
        in <code>otf-theme</code>. Note: this Storybook has its own theme toolbar
        which may override the root class — see the change in an app consumer.
      </Body>
    </div>
  )
}

Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.

Props

Props declared in the ColorSchemeSelect source. Inherited HTML attributes are not listed.

PropTypeDefaultDescription
classNamestring
defaultValuestring
onChange(themeClass: string) => void
optionsComboboxOption[]