HextaUI

Color picker (UI SDK): Vertical sliders

Set orientation="vertical" on a slider to stand it beside the area.

import {
  ColorPicker,
  ColorPickerArea,
  ColorPickerSlider,
} from "@/components/ui/ui-sdk-color-picker"

function UiSdkColorPickerVertical() {
  return (
    <ColorPicker aria-label="Highlight" space="hsl" defaultValue="#f97316">
      <div className="flex gap-3">
        <div className="min-w-0 flex-1">
          <ColorPickerArea />
        </div>
        <ColorPickerSlider channel="hue" orientation="vertical" />
        <ColorPickerSlider channel="alpha" orientation="vertical" />
      </div>
    </ColorPicker>
  )
}

export { UiSdkColorPickerVertical }

This adds the example as components/examples/ui-sdk-color-picker/vertical.tsx, together with the Color picker component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/ui-sdk-color-picker-vertical.json

To add only the component, follow the Color picker installation.

Props in this example

The Color picker props this example sets, from the API reference.

PropTypeDefault
defaultValue
string"black"
spaceWhich channels the parts edit.
"hsv" | "hsl" | "srgb" | "oklch""hsv"
PropTypeDefault
channelHue, or blue in sRGB, by default.
ColorChannel–
orientation
"horizontal" | "vertical""horizontal"

Every prop is in the Color picker API reference.

See them all, with keyboard support and accessibility notes, on the Color picker page.