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

Function ColorSlider

starters/tailwind/src/ColorSlider.tsx:31–53  ·  view source on GitHub ↗
({label, ...props}: ColorSliderProps)

Source from the content-addressed store, hash-verified

29}
30
31export function ColorSlider({label, ...props}: ColorSliderProps) {
32 return (
33 <AriaColorSlider
34 {...props}
35 className={composeTailwindRenderProps(
36 props.className,
37 'font-sans orientation-horizontal:grid orientation-vertical:flex grid-cols-[1fr_auto] flex-col items-center gap-2 orientation-horizontal:w-56'
38 )}>
39 <Label>{label}</Label>
40 <SliderOutput className="text-sm text-neutral-500 dark:text-neutral-400 font-medium orientation-vertical:hidden" />
41 <SliderTrack
42 className={trackStyles}
43 style={({defaultStyle, isDisabled}) => ({
44 ...defaultStyle,
45 background: isDisabled
46 ? undefined
47 : `${defaultStyle.background}, repeating-conic-gradient(#CCC 0% 25%, white 0% 50%) 50% / 16px 16px`
48 })}>
49 <ColorThumb />
50 </SliderTrack>
51 </AriaColorSlider>
52 );
53}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected