MCPcopy Create free account
hub / github.com/adobe/react-spectrum / ColorPicker

Function ColorPicker

starters/docs/src/ColorPicker.tsx:20–40  ·  view source on GitHub ↗
({label, children, ...props}: ColorPickerProps)

Source from the content-addressed store, hash-verified

18}
19
20export function ColorPicker({label, children, ...props}: ColorPickerProps) {
21 return (
22 <AriaColorPicker {...props}>
23 <DialogTrigger>
24 <Button className="color-picker">
25 <ColorSwatch />
26 <span>{label}</span>
27 </Button>
28 <Popover hideArrow placement="bottom start" className="color-picker-dialog">
29 {children || (
30 <>
31 <ColorArea colorSpace="hsb" xChannel="saturation" yChannel="brightness" />
32 <ColorSlider colorSpace="hsb" channel="hue" />
33 <ColorField label="Hex" />
34 </>
35 )}
36 </Popover>
37 </DialogTrigger>
38 </AriaColorPicker>
39 );
40}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected