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

Function ColorPicker

starters/tailwind/src/ColorPicker.tsx:28–50  ·  view source on GitHub ↗
({label, children, ...props}: ColorPickerProps)

Source from the content-addressed store, hash-verified

26}
27
28export function ColorPicker({label, children, ...props}: ColorPickerProps) {
29 return (
30 <AriaColorPicker {...props}>
31 <DialogTrigger>
32 <Button className={buttonStyles}>
33 <ColorSwatch />
34 <span>{label}</span>
35 </Button>
36 <Popover placement="bottom start">
37 <Dialog className="flex flex-col gap-2">
38 {children || (
39 <>
40 <ColorArea colorSpace="hsb" xChannel="saturation" yChannel="brightness" />
41 <ColorSlider colorSpace="hsb" channel="hue" />
42 <ColorField label="Hex" />
43 </>
44 )}
45 </Dialog>
46 </Popover>
47 </DialogTrigger>
48 </AriaColorPicker>
49 );
50}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected