
Outline trigger in a labelled field that opens the full picker with an eye dropper and format fields.
@reui
c-color-picker-2.tsx
import { ColorPicker } from "@/components/reui/color-picker"
import {
Field,
FieldDescription,
FieldLabel,
} from "@/components/ui/field"
export function Pattern() {
return (
<div className="w-full max-w-xs">
<Field>
<FieldLabel id="accent-color-label" htmlFor="accent-color">
Accent color
</FieldLabel>
{/* With no children the picker renders its own trigger and popover.
`aria-labelledby` keeps the value in the trigger's name, so it
reads "Accent color #0EA5E9" rather than the label alone. */}
<ColorPicker
id="accent-color"
defaultValue="#0ea5e9"
aria-labelledby="accent-color-label"
aria-describedby="accent-color-description"
/>
<FieldDescription id="accent-color-description">
Used for links, focus rings and primary buttons.
</FieldDescription>
</Field>
</div>
)
}




























