Components
Loading preview...
A color slider allows users to adjust an individual channel of a color value.
@reapollo
npx shadcn@latest add https://21st.dev/r/larsen66/heroui-color-sliderimport { ColorSlider } from "@/components/ui/heroui-color-slider";
export default function Vertical() {
return (
<div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
<div className="flex h-48 gap-4">
<ColorSlider aria-label="Hue" channel="hue" defaultValue="hsl(0, 100%, 50%)" orientation="vertical">
<ColorSlider.Track>
<ColorSlider.Thumb />
</ColorSlider.Track>
</ColorSlider>
<ColorSlider aria-label="Saturation" channel="saturation" defaultValue="hsl(0, 100%, 50%)" orientation="vertical">
<ColorSlider.Track>
<ColorSlider.Thumb />
</ColorSlider.Track>
</ColorSlider>
<ColorSlider aria-label="Lightness" channel="lightness" defaultValue="hsl(0, 100%, 50%)" orientation="vertical">
<ColorSlider.Track>
<ColorSlider.Thumb />
</ColorSlider.Track>
</ColorSlider>
</div>
</div>
);
}
export { Vertical };