Components
HeroUI v3 ColorSlider — slider for a single color channel (RGB/HSL/alpha), vertical, disabled, controlled and custom render.
npx @21st-dev/cli@beta add hero_ui/heroui-color-sliderLoading preview...
"use client"
import { ColorSlider } from "@/components/ui/heroui-color-slider"
import { Label } from "@heroui/react"
export default function CustomRenderFunction() {
return (
<ColorSlider
channel="hue"
className="w-full max-w-xs"
defaultValue="hsl(0, 100%, 50%)"
render={(props) => <div {...props} data-custom="foo" />}
>
<Label>Hue</Label>
<ColorSlider.Output />
<ColorSlider.Track>
<ColorSlider.Thumb />
</ColorSlider.Track>
</ColorSlider>
)
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...