HextaUI

Color picker (UI SDK): Disabled

A disabled picker can’t be focused or changed, and submits nothing.

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

function UiSdkColorPickerDisabled() {
  return (
    <ColorPicker aria-label="Brand color" defaultValue="#0ea5e9" disabled>
      <ColorPickerArea />
      <ColorPickerSlider channel="hue" />
      <ColorPickerInput aria-label="Hex" />
    </ColorPicker>
  )
}

export { UiSdkColorPickerDisabled }

This adds the example as components/examples/ui-sdk-color-picker/disabled.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-disabled.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"
disabled
booleanfalse
PropTypeDefault
channelHue, or blue in sRGB, by default.
ColorChannel–

Every prop is in the Color picker API reference.

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