ComponentsSelection & pickers
Color picker
Pick a colour by eye on a saturation and brightness area, by hex value, or from presets taken from the theme.
In a popover
"use client";
import { ColorPicker } from "@/components/miyuki-ui/color-picker";
export default function ColorPickerDemo() {
return (
<ColorPicker
className="w-full max-w-[15rem]"
label="Trail colour"
defaultValue="#D4553A"
description="Draws the Kiso forest trail on the map."
/>
);
}Inline, with opacity
"use client";
import { ColorPickerPanel } from "@/components/miyuki-ui/color-picker";
export default function ColorPickerInlineDemo() {
return (
<div className="rounded-xl border border-border bg-card p-4 shadow-sm">
<ColorPickerPanel label="Hut marker" defaultValue="#2E8F7E" showAlpha />
</div>
);
}Install
npx shadcn@latest add @miyuki-ui/color-pickerThis needs the @miyuki-ui registry in your components.json. See Using the shadcn CLI.
Props
ColorPicker
Prop
Type
ColorPickerPanel
Prop
Type