ColorPicker
A shared color value for composing fields, sliders and swatches.
Usage
import { ColorPicker } from "@lenso/ui";"use client";
import { ColorArea, ColorPicker, ColorSlider, ColorSwatch } from "@lenso/ui";import * as stylex from "@stylexjs/stylex";
const styles = stylex.create({ area: { maxWidth: "100%" }, slider: { gap: 4, paddingInline: 4 }, output: { color: "var(--muted)" },});export function Basic() { return ( <ColorPicker defaultValue="#0485F7"> <ColorPicker.Trigger> <ColorSwatch size="lg" /> <span>Pick a color</span> </ColorPicker.Trigger> <ColorPicker.Popover> <ColorArea aria-label="Color area" xstyle={styles.area} colorSpace="hsb" xChannel="saturation" yChannel="brightness" > <ColorArea.Thumb /> </ColorArea> <ColorSlider aria-label="Hue" channel="hue" xstyle={styles.slider} colorSpace="hsb"> <span>Hue</span> <ColorSlider.Output xstyle={styles.output} /> <ColorSlider.Track> <ColorSlider.Thumb /> </ColorSlider.Track> </ColorSlider> </ColorPicker.Popover> </ColorPicker> );}Examples
color picker controlled
"use client";/** Adapted from HeroUI v3.2.6. Apache-2.0. Gravity Shuffle replaces the source Iconify reference to the same icon. */import { Button, ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatch, ColorSwatchPicker, parseColor,} from "@lenso/ui";import { Shuffle } from "@gravity-ui/icons";import { useState } from "react";import * as stylex from "@stylexjs/stylex";import { styles } from "./source.stylex";const presets = [ "#ef4444", "#f97316", "#eab308", "#22c55e", "#06b6d4", "#3b82f6", "#8b5cf6", "#ec4899", "#f43f5e",];export function Controlled() { const [color, setColor] = useState(parseColor("#325578")); function shuffleColor() { const hue = Math.floor(Math.random() * 360); const saturation = 50 + Math.floor(Math.random() * 50); const lightness = 40 + Math.floor(Math.random() * 30); setColor(parseColor(`hsl(${hue}, ${saturation}%, ${lightness}%)`)); } return ( <div {...stylex.props(styles.column)}> <ColorPicker value={color} onChange={setColor}> <ColorPicker.Trigger> <ColorSwatch size="lg" /> <span>Pick a color</span> </ColorPicker.Trigger> <ColorPicker.Popover xstyle={styles.popover}> <ColorSwatchPicker aria-label="Color presets" xstyle={styles.presets} size="xs"> {presets.map((preset) => ( <ColorSwatchPicker.Item key={preset} color={preset}> <ColorSwatchPicker.Swatch /> </ColorSwatchPicker.Item> ))} </ColorSwatchPicker> <ColorArea aria-label="Color area" xstyle={styles.area} colorSpace="hsb" xChannel="saturation" yChannel="brightness" > <ColorArea.Thumb /> </ColorArea> <div {...stylex.props(styles.hueRow)}> <ColorSlider aria-label="Hue slider" channel="hue" xstyle={styles.flex1} colorSpace="hsb" > <ColorSlider.Track> <ColorSlider.Thumb /> </ColorSlider.Track> </ColorSlider> <Button isIconOnly aria-label="Shuffle color" size="sm" variant="tertiary" onClick={shuffleColor} > <Shuffle {...stylex.props(styles.icon)} /> </Button> </div> <ColorField aria-label="Color field"> <ColorField.Group variant="secondary"> <ColorField.Prefix> <ColorSwatch size="xs" /> </ColorField.Prefix> <ColorField.Input /> </ColorField.Group> </ColorField> </ColorPicker.Popover> </ColorPicker> <p {...stylex.props(styles.selected)}> Selected: <span {...stylex.props(styles.medium)}>{color.toString("hex")}</span> </p> </div> );}color picker with swatches
"use client";/** Adapted from HeroUI v3.2.6. Apache-2.0. */import { ColorArea, ColorPicker, ColorSlider, ColorSwatch, ColorSwatchPicker } from "@lenso/ui";import { styles } from "./source.stylex";const presets = [ "#ef4444", "#f97316", "#eab308", "#22c55e", "#06b6d4", "#3b82f6", "#8b5cf6", "#ec4899", "#f43f5e",];export function WithSwatches() { return ( <ColorPicker defaultValue="#F43F5E"> <ColorPicker.Trigger> <ColorSwatch size="lg" /> <span>Brand Color</span> </ColorPicker.Trigger> <ColorPicker.Popover> <ColorArea aria-label="Color area" xstyle={styles.area} colorSpace="hsb" xChannel="saturation" yChannel="brightness" > <ColorArea.Thumb /> </ColorArea> <ColorSlider aria-label="Hue slider" channel="hue" xstyle={styles.slider} colorSpace="hsb"> <ColorSlider.Label>Hue</ColorSlider.Label> <ColorSlider.Output xstyle={styles.output} /> <ColorSlider.Track> <ColorSlider.Thumb /> </ColorSlider.Track> </ColorSlider> <ColorSwatchPicker aria-label="Color presets" xstyle={styles.swatches} size="xs"> {presets.map((preset) => ( <ColorSwatchPicker.Item key={preset} color={preset}> <ColorSwatchPicker.Swatch /> </ColorSwatchPicker.Item> ))} </ColorSwatchPicker> </ColorPicker.Popover> </ColorPicker> );}color picker with fields
"use client";/** Adapted from HeroUI v3.2.6. Apache-2.0. */import { ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatch } from "@lenso/ui";import { useState } from "react";import * as stylex from "@stylexjs/stylex";import { styles } from "./source.stylex";import { ColorDemoSelect } from "./source";type Space = "hsb" | "hsl" | "rgb";const channels = { hsb: ["hue", "saturation", "brightness"], hsl: ["hue", "saturation", "lightness"], rgb: ["red", "green", "blue"],} as const;export function WithFields() { const [colorSpace, setColorSpace] = useState<Space>("hsl"); return ( <ColorPicker defaultValue="hsla(220, 90%, 50%, 0.8)"> <ColorPicker.Trigger> <ColorSwatch size="lg" /> <span>Pick a color</span> </ColorPicker.Trigger> <ColorPicker.Popover xstyle={styles.narrowPopover}> <ColorArea aria-label="Color area" xstyle={styles.area} colorSpace="hsb" xChannel="saturation" yChannel="brightness" > <ColorArea.Thumb /> </ColorArea> <ColorSlider channel="hue" xstyle={styles.slider} colorSpace="hsb"> <ColorSlider.Label>Hue</ColorSlider.Label> <ColorSlider.Output xstyle={styles.output} /> <ColorSlider.Track> <ColorSlider.Thumb /> </ColorSlider.Track> </ColorSlider> <ColorDemoSelect label="Color space" value={colorSpace} options={["hsb", "hsl", "rgb"]} onChange={setColorSpace} uppercase /> <div {...stylex.props(styles.channelGrid)}> {channels[colorSpace].map((channel) => ( <ColorField key={channel} aria-label={channel} channel={channel} colorSpace={colorSpace} > <ColorField.Group variant="secondary"> <ColorField.Input /> </ColorField.Group> </ColorField> ))} </div> </ColorPicker.Popover> </ColorPicker> );}color picker with sliders
"use client";/** Adapted from HeroUI v3.2.6. Apache-2.0. */import { ColorPicker, ColorSlider, ColorSwatch } from "@lenso/ui";import { useState } from "react";import * as stylex from "@stylexjs/stylex";import { styles } from "./source.stylex";import { ColorDemoSelect } from "./source";type Space = "hsb" | "hsl" | "rgb";const channelProps = { hsb: [ { colorSpace: "hsb", channel: "hue" }, { colorSpace: "hsb", channel: "saturation" }, { colorSpace: "hsb", channel: "brightness" }, { colorSpace: "hsb", channel: "alpha" }, ], hsl: [ { colorSpace: "hsl", channel: "hue" }, { colorSpace: "hsl", channel: "saturation" }, { colorSpace: "hsl", channel: "lightness" }, { colorSpace: "hsl", channel: "alpha" }, ], rgb: [ { colorSpace: "rgb", channel: "red" }, { colorSpace: "rgb", channel: "green" }, { colorSpace: "rgb", channel: "blue" }, { colorSpace: "rgb", channel: "alpha" }, ],} as const;export function WithSliders() { const [colorSpace, setColorSpace] = useState<Space>("hsl"); return ( <ColorPicker defaultValue="hsl(219, 58%, 93%)"> <ColorPicker.Trigger> <ColorSwatch size="lg" /> <span>Pick a color</span> </ColorPicker.Trigger> <ColorPicker.Popover xstyle={styles.slidersPopover}> <ColorDemoSelect label="Color space" value={colorSpace} options={["hsb", "hsl", "rgb"]} onChange={setColorSpace} uppercase /> <div {...stylex.props(styles.column2)}> {channelProps[colorSpace].map((props) => ( <ColorSlider key={props.channel} {...props} aria-label={props.channel} xstyle={styles.slider} > <ColorSlider.Label xstyle={styles.capitalize}>{props.channel}</ColorSlider.Label> <ColorSlider.Output xstyle={styles.output} /> <ColorSlider.Track> <ColorSlider.Thumb /> </ColorSlider.Track> </ColorSlider> ))} </div> </ColorPicker.Popover> </ColorPicker> );}color picker custom styles
"use client";/** Adapted from HeroUI v3.2.6. Apache-2.0. */import { ColorArea, ColorPicker, ColorSlider, ColorSwatch } from "@lenso/ui";import * as stylex from "@stylexjs/stylex";import { styles } from "./source.stylex";export function CustomStyles() { return ( <ColorPicker defaultValue="#0485F7"> <ColorPicker.Trigger xstyle={styles.trigger}> <ColorSwatch size="lg" /> <span {...stylex.props(styles.label)}>Theme color</span> </ColorPicker.Trigger> <ColorPicker.Popover xstyle={styles.surface}> <ColorArea aria-label="Color area" xstyle={styles.area} colorSpace="hsb" xChannel="saturation" yChannel="brightness" > <ColorArea.Thumb /> </ColorArea> <ColorSlider channel="hue" xstyle={styles.slider} colorSpace="hsb"> <ColorSlider.Label>Hue</ColorSlider.Label> <ColorSlider.Output xstyle={styles.output} /> <ColorSlider.Track> <ColorSlider.Thumb /> </ColorSlider.Track> </ColorSlider> </ColorPicker.Popover> </ColorPicker> );}API Reference
Generated from the local public TypeScript exports. Types and callback state follow the installed native contracts, not the historical HeroUI API.
Only literal defaults in the component's parameter declaration are shown. Other defaults may depend on context or the native component.
ColorPickerRoot
({ children, xstyle, ...props }: ColorPickerRootProps): JSX.Element
packages/react/src/components/color-picker/color-picker.tsx:15
react-aria-components/ColorPicker
| Property | Type | Required | Local default | Description |
|---|---|---|---|---|
slot | string | null | undefined | No | Not declared | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit `null` value indicates that the local props completely override all props received from a parent.node_modules/react-aria-components/dist/types/src/utils.d.ts:172 |
defaultValue | string | Color | undefined | No | Not declared | The default value (uncontrolled).node_modules/@react-types/shared/src/inputs.d.ts:73 |
children | ChildrenOrFunction<ColorPickerRenderProps> | Yes | Not declared | The children of the component. A function may be provided to alter the children based on component state.node_modules/react-aria-components/dist/types/src/ColorPicker.d.ts:14 |
onChange | ((value: Color) => void) | undefined | No | Not declared | Handler that is called when the value changes.node_modules/@react-types/shared/src/inputs.d.ts:75 |
value | string | Color | undefined | No | Not declared | The current value (controlled).node_modules/@react-types/shared/src/inputs.d.ts:71 |
xstyle | XStyle | No | Not declared | packages/react/src/utils/styled.tsx:7 |
data-slot | unknown | No | Not declared | packages/react/src/utils/styled.tsx:8 |
Callback state: ColorPickerRenderProps & { defaultChildren: ReactNode | undefined; }
colorColordefaultChildrenReactNode
ColorPickerTrigger
({ xstyle, style, ...props }: StyleXProps<ButtonProps & RefAttributes<HTMLButtonElement>>): ReactElement<any, string | JSXElementConstructor<any>>
packages/react/src/components/color-picker/color-picker.tsx:29
react-aria-components/ColorPicker
| Property | Type | Required | Local default | Description |
|---|---|---|---|---|
translate | undefined | "yes" | "no" | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:303 |
hidden | undefined | false | true | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:301 |
style | StyleOrFunction<ButtonRenderProps> | undefined | No | Not declared | The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. A function may be provided to compute the style based on component state.node_modules/react-aria-components/dist/types/src/utils.d.ts:132 |
name | string | undefined | No | Not declared | Submitted as a pair with the button's value as part of the form data.node_modules/react-aria/dist/types/src/button/useButton.d.ts:68 |
form | string | undefined | No | Not declared | The `<form>` element to associate the button with. The value of this attribute must be the id of a `<form>` in the same document. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#form).node_modules/react-aria/dist/types/src/button/useButton.d.ts:53 |
slot | string | null | undefined | No | Not declared | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit `null` value indicates that the local props completely override all props received from a parent.node_modules/react-aria-components/dist/types/src/utils.d.ts:172 |
dir | string | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:299 |
aria-disabled | undefined | false | true | "false" | "true" | No | Not declared | Indicates whether the element is disabled to users of assistive technology.node_modules/react-aria/dist/types/src/button/useButton.d.ts:11 |
ref | Ref<HTMLButtonElement> | undefined | No | Not declared | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).node_modules/@types/react/index.d.ts:301 |
autoFocus | undefined | false | true | No | Not declared | Whether the element should receive focus on render.node_modules/@react-types/shared/src/events.d.ts:144 |
id | string | undefined | No | Not declared | The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).node_modules/@react-types/shared/src/dom.d.ts:75 |
lang | string | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:300 |
inert | undefined | false | true | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:302 |
aria-controls | string | undefined | No | Not declared | Identifies the element (or elements) whose contents or presence are controlled by the current element.node_modules/react-aria/dist/types/src/button/useButton.d.ts:26 |
aria-current | undefined | false | true | "page" | "false" | "true" | "time" | "step" | "location" | "date" | No | Not declared | Indicates whether this element represents the current item within a container or set of related elements.node_modules/react-aria/dist/types/src/button/useButton.d.ts:33 |
aria-describedby | string | undefined | No | Not declared | Identifies the element (or elements) that describes the object.node_modules/@react-types/shared/src/dom.d.ts:51 |
aria-details | string | undefined | No | Not declared | Identifies the element (or elements) that provide a detailed, extended description for the object.node_modules/@react-types/shared/src/dom.d.ts:57 |
aria-expanded | undefined | false | true | "false" | "true" | No | Not declared | Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.node_modules/react-aria/dist/types/src/button/useButton.d.ts:16 |
aria-haspopup | undefined | false | true | "grid" | "listbox" | "menu" | "false" | "true" | "dialog" | "tree" | No | Not declared | Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.node_modules/react-aria/dist/types/src/button/useButton.d.ts:21 |
aria-label | string | undefined | No | Not declared | Defines a string value that labels the current element.node_modules/@react-types/shared/src/dom.d.ts:41 |
aria-labelledby | string | undefined | No | Not declared | Identifies the element (or elements) that labels the current element.node_modules/@react-types/shared/src/dom.d.ts:46 |
aria-pressed | undefined | false | true | "mixed" | "false" | "true" | No | Not declared | Indicates the current "pressed" state of toggle buttons.node_modules/react-aria/dist/types/src/button/useButton.d.ts:28 |
children | ChildrenOrFunction<ButtonRenderProps> | No | Not declared | The children of the component. A function may be provided to alter the children based on component state.node_modules/react-aria-components/dist/types/src/utils.d.ts:142 |
onFocus | ((e: FocusEvent<Element, Element>) => void) | undefined | No | Not declared | Handler that is called when the element receives focus.node_modules/@react-types/shared/src/events.d.ts:101 |
onBlur | ((e: FocusEvent<Element, Element>) => void) | undefined | No | Not declared | Handler that is called when the element loses focus.node_modules/@react-types/shared/src/events.d.ts:103 |
onKeyDown | ((e: KeyboardEvent) => void) | undefined | No | Not declared | Handler that is called when a key is pressed.node_modules/@react-types/shared/src/events.d.ts:94 |
onKeyUp | ((e: KeyboardEvent) => void) | undefined | No | Not declared | Handler that is called when a key is released.node_modules/@react-types/shared/src/events.d.ts:96 |
onAuxClick | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:322 |
onAuxClickCapture | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:323 |
onClick | ((e: MouseEvent<FocusableElement>) => void) | undefined | No | Not declared | **Not recommended โ use `onPress` instead.** `onClick` is an alias for `onPress` provided for compatibility with other libraries. `onPress` provides additional event details for non-mouse interactions.node_modules/@react-types/shared/src/events.d.ts:139 |
onClickCapture | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:321 |
onContextMenu | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:324 |
onContextMenuCapture | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:325 |
onDoubleClick | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:326 |
onDoubleClickCapture | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:327 |
onMouseDown | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:328 |
onMouseDownCapture | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:329 |
onMouseEnter | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:330 |
onMouseLeave | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:331 |
onMouseMove | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:332 |
onMouseMoveCapture | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:333 |
onMouseOut | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:334 |
onMouseOutCapture | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:335 |
onMouseOver | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:336 |
onMouseOverCapture | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:337 |
onMouseUp | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:338 |
onMouseUpCapture | MouseEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:339 |
onTouchCancel | TouchEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:342 |
onTouchCancelCapture | TouchEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:343 |
onTouchEnd | TouchEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:344 |
onTouchEndCapture | TouchEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:345 |
onTouchMove | TouchEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:346 |
onTouchMoveCapture | TouchEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:347 |
onTouchStart | TouchEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:348 |
onTouchStartCapture | TouchEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:349 |
onPointerDown | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:352 |
onPointerDownCapture | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:353 |
onPointerMove | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:354 |
onPointerMoveCapture | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:355 |
onPointerUp | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:356 |
onPointerUpCapture | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:357 |
onPointerCancel | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:358 |
onPointerCancelCapture | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:359 |
onPointerEnter | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:360 |
onPointerLeave | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:361 |
onPointerOver | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:362 |
onPointerOverCapture | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:363 |
onPointerOut | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:364 |
onPointerOutCapture | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:365 |
onGotPointerCapture | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:366 |
onGotPointerCaptureCapture | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:367 |
onLostPointerCapture | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:368 |
onLostPointerCaptureCapture | PointerEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:369 |
onScroll | UIEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:372 |
onScrollCapture | UIEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:373 |
onWheel | WheelEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:376 |
onWheelCapture | WheelEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:377 |
onAnimationStart | AnimationEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:380 |
onAnimationStartCapture | AnimationEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:381 |
onAnimationEnd | AnimationEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:382 |
onAnimationEndCapture | AnimationEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:383 |
onAnimationIteration | AnimationEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:384 |
onAnimationIterationCapture | AnimationEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:385 |
onTransitionCancel | TransitionEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:388 |
onTransitionCancelCapture | TransitionEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:389 |
onTransitionEnd | TransitionEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:390 |
onTransitionEndCapture | TransitionEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:391 |
onTransitionRun | TransitionEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:392 |
onTransitionRunCapture | TransitionEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:393 |
onTransitionStart | TransitionEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:394 |
onTransitionStartCapture | TransitionEventHandler<HTMLButtonElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:395 |
value | string | undefined | No | Not declared | The value associated with the button's name when it's submitted with the form data.node_modules/react-aria/dist/types/src/button/useButton.d.ts:70 |
render | DOMRenderFunction<"button", ButtonRenderProps> | undefined | No | Not declared | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if `<button>` is expected, you cannot render an `<a>`). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.node_modules/react-aria-components/dist/types/src/utils.d.ts:208 |
formAction | string | ((formData: FormData) => void | Promise<void>) | undefined | No | Not declared | The URL that processes the information submitted by the button. Overrides the action attribute of the button's form owner.node_modules/react-aria/dist/types/src/button/useButton.d.ts:58 |
formEncType | string | undefined | No | Not declared | Indicates how to encode the form data that is submitted.node_modules/react-aria/dist/types/src/button/useButton.d.ts:60 |
formMethod | string | undefined | No | Not declared | Indicates the HTTP method used to submit the form.node_modules/react-aria/dist/types/src/button/useButton.d.ts:62 |
formNoValidate | undefined | false | true | No | Not declared | Indicates that the form is not to be validated when it is submitted.node_modules/react-aria/dist/types/src/button/useButton.d.ts:64 |
formTarget | string | undefined | No | Not declared | Overrides the target attribute of the button's form owner.node_modules/react-aria/dist/types/src/button/useButton.d.ts:66 |
type | undefined | "button" | "reset" | "submit" | No | Not declared | The behavior of the button when used in an HTML form.node_modules/react-aria/dist/types/src/button/useButton.d.ts:39 |
isDisabled | undefined | false | true | No | Not declared | Whether the button is disabled.node_modules/react-aria/dist/types/src/button/useButton.d.ts:5 |
onFocusChange | ((isFocused: boolean) => void) | undefined | No | Not declared | Handler that is called when the element's focus status changes.node_modules/@react-types/shared/src/events.d.ts:105 |
onPress | ((e: PressEvent) => void) | undefined | No | Not declared | Handler that is called when the press is released over the target.node_modules/@react-types/shared/src/events.d.ts:119 |
onPressStart | ((e: PressEvent) => void) | undefined | No | Not declared | Handler that is called when a press interaction starts.node_modules/@react-types/shared/src/events.d.ts:121 |
onPressEnd | ((e: PressEvent) => void) | undefined | No | Not declared | Handler that is called when a press interaction ends, either over the target or when the pointer leaves the target.node_modules/@react-types/shared/src/events.d.ts:126 |
onPressChange | ((isPressed: boolean) => void) | undefined | No | Not declared | Handler that is called when the press state changes.node_modules/@react-types/shared/src/events.d.ts:128 |
onPressUp | ((e: PressEvent) => void) | undefined | No | Not declared | Handler that is called when a press is released over the target, regardless of whether it started on the target or not.node_modules/@react-types/shared/src/events.d.ts:133 |
preventFocusOnPress | undefined | false | true | No | Not declared | Whether to prevent focus from moving to the button when pressing it. Caution, this can make the button inaccessible and should only be used when alternative keyboard interaction is provided, such as ComboBox's MenuTrigger or a NumberField's increment/decrement control.node_modules/react-aria/dist/types/src/button/useButton.d.ts:47 |
excludeFromTabOrder | undefined | false | true | No | Not declared | Whether to exclude the element from the sequential tab order. If true, the element will not be focusable via the keyboard by tabbing. This should be avoided except in rare scenarios where an alternative means of accessing the element or its functionality via the keyboard is available.node_modules/@react-types/shared/src/dom.d.ts:85 |
isPending | undefined | false | true | No | Not declared | Whether the button is in a pending state. This disables press and hover events while retaining focusability, and announces the pending state to screen readers.node_modules/react-aria-components/dist/types/src/Button.d.ts:56 |
onHoverStart | ((e: HoverEvent) => void) | undefined | No | Not declared | Handler that is called when a hover interaction starts.node_modules/@react-types/shared/src/events.d.ts:110 |
onHoverEnd | ((e: HoverEvent) => void) | undefined | No | Not declared | Handler that is called when a hover interaction ends.node_modules/@react-types/shared/src/events.d.ts:112 |
onHoverChange | ((isHovering: boolean) => void) | undefined | No | Not declared | Handler that is called when the hover state changes.node_modules/@react-types/shared/src/events.d.ts:114 |
xstyle | XStyle | No | Not declared | packages/react/src/utils/styled.tsx:7 |
data-slot | unknown | No | Not declared | packages/react/src/utils/styled.tsx:8 |
Callback state: ButtonRenderProps & { defaultStyle: CSSProperties; }
isHoveredbooleanisPressedbooleanisFocusedbooleanisFocusVisiblebooleanisDisabledbooleanisPendingbooleandefaultStyleCSSProperties
Callback state: ButtonRenderProps & { defaultChildren: ReactNode | undefined; }
isHoveredbooleanisPressedbooleanisFocusedbooleanisFocusVisiblebooleanisDisabledbooleanisPendingbooleandefaultChildrenReactNode
Callback state: ButtonRenderProps
isHoveredbooleanisPressedbooleanisFocusedbooleanisFocusVisiblebooleanisDisabledbooleanisPendingboolean
ColorPickerPopover
({ style, ...props }: StyleXProps<ComponentPropsWithRef<typeof Popover>>): JSX.Element
packages/react/src/components/color-picker/color-picker.tsx:47
react-aria-components/ColorPicker
| Property | Type | Required | Local default | Description |
|---|---|---|---|---|
maxHeight | number | undefined | No | Not declared | The maxHeight specified for the overlay element. By default, it will take all space up to the current viewport height.node_modules/react-aria/dist/types/src/overlays/useOverlayPosition.d.ts:87 |
offset | number | undefined | No | Not declared | The additional offset applied along the main axis between the element and its anchor element.node_modules/react-aria-components/dist/types/src/Popover.d.ts:56 |
translate | undefined | "yes" | "no" | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:303 |
hidden | undefined | false | true | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:301 |
trigger | string | undefined | No | Not declared | The name of the component that triggered the popover. This is reflected on the element as the `data-trigger` attribute, and can be used to provide specific styles for the popover depending on which element triggered it.node_modules/react-aria-components/dist/types/src/Popover.d.ts:20 |
style | StyleOrFunction<PopoverRenderProps> | undefined | No | Not declared | The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. A function may be provided to compute the style based on component state.node_modules/react-aria-components/dist/types/src/utils.d.ts:132 |
slot | string | null | undefined | No | Not declared | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit `null` value indicates that the local props completely override all props received from a parent.node_modules/react-aria-components/dist/types/src/utils.d.ts:172 |
dir | string | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:299 |
ref | Ref<HTMLElement> | undefined | No | Not declared | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).node_modules/@types/react/index.d.ts:301 |
lang | string | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:300 |
inert | undefined | false | true | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:302 |
aria-describedby | string | undefined | No | Not declared | Identifies the element (or elements) that describes the object.node_modules/@react-types/shared/src/dom.d.ts:51 |
aria-details | string | undefined | No | Not declared | Identifies the element (or elements) that provide a detailed, extended description for the object.node_modules/@react-types/shared/src/dom.d.ts:57 |
aria-label | string | undefined | No | Not declared | Defines a string value that labels the current element.node_modules/@react-types/shared/src/dom.d.ts:41 |
aria-labelledby | string | undefined | No | Not declared | Identifies the element (or elements) that labels the current element.node_modules/@react-types/shared/src/dom.d.ts:46 |
children | ChildrenOrFunction<PopoverRenderProps> | No | Not declared | The children of the component. A function may be provided to alter the children based on component state.node_modules/react-aria-components/dist/types/src/utils.d.ts:142 |
onAuxClick | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:322 |
onAuxClickCapture | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:323 |
onClick | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:320 |
onClickCapture | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:321 |
onContextMenu | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:324 |
onContextMenuCapture | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:325 |
onDoubleClick | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:326 |
onDoubleClickCapture | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:327 |
onMouseDown | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:328 |
onMouseDownCapture | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:329 |
onMouseEnter | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:330 |
onMouseLeave | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:331 |
onMouseMove | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:332 |
onMouseMoveCapture | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:333 |
onMouseOut | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:334 |
onMouseOutCapture | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:335 |
onMouseOver | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:336 |
onMouseOverCapture | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:337 |
onMouseUp | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:338 |
onMouseUpCapture | MouseEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:339 |
onTouchCancel | TouchEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:342 |
onTouchCancelCapture | TouchEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:343 |
onTouchEnd | TouchEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:344 |
onTouchEndCapture | TouchEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:345 |
onTouchMove | TouchEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:346 |
onTouchMoveCapture | TouchEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:347 |
onTouchStart | TouchEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:348 |
onTouchStartCapture | TouchEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:349 |
onPointerDown | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:352 |
onPointerDownCapture | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:353 |
onPointerMove | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:354 |
onPointerMoveCapture | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:355 |
onPointerUp | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:356 |
onPointerUpCapture | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:357 |
onPointerCancel | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:358 |
onPointerCancelCapture | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:359 |
onPointerEnter | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:360 |
onPointerLeave | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:361 |
onPointerOver | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:362 |
onPointerOverCapture | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:363 |
onPointerOut | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:364 |
onPointerOutCapture | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:365 |
onGotPointerCapture | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:366 |
onGotPointerCaptureCapture | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:367 |
onLostPointerCapture | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:368 |
onLostPointerCaptureCapture | PointerEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:369 |
onScroll | UIEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:372 |
onScrollCapture | UIEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:373 |
onWheel | WheelEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:376 |
onWheelCapture | WheelEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:377 |
onAnimationStart | AnimationEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:380 |
onAnimationStartCapture | AnimationEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:381 |
onAnimationEnd | AnimationEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:382 |
onAnimationEndCapture | AnimationEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:383 |
onAnimationIteration | AnimationEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:384 |
onAnimationIterationCapture | AnimationEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:385 |
onTransitionCancel | TransitionEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:388 |
onTransitionCancelCapture | TransitionEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:389 |
onTransitionEnd | TransitionEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:390 |
onTransitionEndCapture | TransitionEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:391 |
onTransitionRun | TransitionEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:392 |
onTransitionRunCapture | TransitionEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:393 |
onTransitionStart | TransitionEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:394 |
onTransitionStartCapture | TransitionEventHandler<HTMLDivElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:395 |
onOpenChange | ((isOpen: boolean) => void) | undefined | No | Not declared | Handler that is called when the overlay's open state changes.node_modules/react-stately/dist/types/src/overlays/useOverlayTriggerState.d.ts:7 |
render | DOMRenderFunction<"div", PopoverRenderProps> | undefined | No | Not declared | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if `<button>` is expected, you cannot render an `<a>`). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.node_modules/react-aria-components/dist/types/src/utils.d.ts:208 |
placement | undefined | "bottom" | "end" | "left" | "right" | "start" | "top" | "bottom left" | "bottom right" | "bottom start" | "bottom end" | "top left" | "top right" | "top start" | "top end" | "left top" | "left bottom" | "start top" | "start bottom" | "right top" | "right bottom" | "end top" | "end bottom" | No | Not declared | The placement of the element with respect to its anchor element.node_modules/react-aria/dist/types/src/overlays/useOverlayPosition.d.ts:12 |
defaultOpen | undefined | false | true | No | Not declared | Whether the overlay is open by default (uncontrolled).node_modules/react-stately/dist/types/src/overlays/useOverlayTriggerState.d.ts:5 |
isOpen | undefined | false | true | No | Not declared | Whether the overlay is open by default (controlled).node_modules/react-stately/dist/types/src/overlays/useOverlayTriggerState.d.ts:3 |
containerPadding | number | undefined | No | Not declared | The placement padding that should be applied between the element and its surrounding container.node_modules/react-aria/dist/types/src/overlays/useOverlayPosition.d.ts:19 |
crossOffset | number | undefined | No | Not declared | The additional offset applied along the cross axis between the element and its anchor element.node_modules/react-aria/dist/types/src/overlays/useOverlayPosition.d.ts:33 |
shouldFlip | undefined | false | true | No | Not declared | Whether the element should flip its orientation (e.g. top to bottom or left to right) when there is insufficient room for it to render completely.node_modules/react-aria/dist/types/src/overlays/useOverlayPosition.d.ts:40 |
triggerRef | RefObject<Element | null> | undefined | No | Not declared | The ref for the element which the popover positions itself with respect to. When used within a trigger component such as DialogTrigger, MenuTrigger, Select, etc., this is set automatically. It is only required when used standalone.node_modules/react-aria-components/dist/types/src/Popover.d.ts:27 |
boundaryElement | Element | undefined | No | Not declared | Element that that serves as the positioning boundary.node_modules/react-aria/dist/types/src/overlays/useOverlayPosition.d.ts:56 |
arrowRef | RefObject<Element | null> | undefined | No | Not declared | A ref for the popover arrow element.node_modules/react-aria/dist/types/src/overlays/usePopover.d.ts:15 |
scrollRef | RefObject<Element | null> | undefined | No | Not declared | A ref for the scrollable region within the overlay.node_modules/react-aria/dist/types/src/overlays/useOverlayPosition.d.ts:74 |
shouldUpdatePosition | undefined | false | true | No | Not declared | Whether the overlay should update its position automatically.node_modules/react-aria/dist/types/src/overlays/useOverlayPosition.d.ts:80 |
arrowBoundaryOffset | number | undefined | No | Not declared | The minimum distance the arrow's edge should be from the edge of the overlay element.node_modules/react-aria/dist/types/src/overlays/useOverlayPosition.d.ts:93 |
getTargetRect | ((target: Element) => DOMRect | null | undefined) | undefined | No | Not declared | Overrides the target element's bounding rectangle. Useful for positioning relative to a specific point such as the mouse cursor (e.g. context menus) or text selection.node_modules/react-aria/dist/types/src/overlays/useOverlayPosition.d.ts:101 |
onFocusWithin | ((e: FocusEvent) => void) | undefined | No | Not declared | Handler that is called when the target element or a descendant receives focus.node_modules/react-aria/dist/types/src/interactions/useFocusWithin.d.ts:7 |
onBlurWithin | ((e: FocusEvent) => void) | undefined | No | Not declared | Handler that is called when the target element and all descendants lose focus.node_modules/react-aria/dist/types/src/interactions/useFocusWithin.d.ts:9 |
onFocusWithinChange | ((isFocusWithin: boolean) => void) | undefined | No | Not declared | Handler that is called when the the focus within state changes.node_modules/react-aria/dist/types/src/interactions/useFocusWithin.d.ts:11 |
isNonModal | undefined | false | true | No | Not declared | Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies. Most popovers should not use this option as it may negatively impact the screen reader experience. Only use with components such as combobox, which are designed to handle this situation carefully.node_modules/react-aria/dist/types/src/overlays/usePopover.d.ts:30 |
isKeyboardDismissDisabled | undefined | false | true | No | Not declared | Whether pressing the escape key to close the popover should be disabled. Most popovers should not use this option. When set to true, an alternative way to close the popover with a keyboard must be provided.node_modules/react-aria/dist/types/src/overlays/usePopover.d.ts:39 |
shouldCloseOnInteractOutside | ((element: Element) => boolean) | undefined | No | Not declared | When user interacts with the argument element outside of the popover ref, return true if onClose should be called. This gives you a chance to filter out interaction with elements that should not dismiss the popover. By default, onClose will always be called on interaction outside the popover ref.node_modules/react-aria/dist/types/src/overlays/usePopover.d.ts:46 |
isEntering | undefined | false | true | No | Not declared | Whether the popover is currently performing an entry animation.node_modules/react-aria-components/dist/types/src/Popover.d.ts:31 |
isExiting | undefined | false | true | No | Not declared | Whether the popover is currently performing an exit animation.node_modules/react-aria-components/dist/types/src/Popover.d.ts:35 |
shouldSkipAnimation | undefined | false | true | No | Not declared | Whether the popover should appear and disappear without an entry or exit animation. This is used by components such as PreviewTrigger to skip animations when quickly swapping between overlays.node_modules/react-aria-components/dist/types/src/Popover.d.ts:41 |
UNSTABLE_portalContainer | Element | undefined | No | Not declared | The container element in which the overlay portal will be placed. This may have unknown behavior depending on where it is portalled to.node_modules/react-aria-components/dist/types/src/Popover.d.ts:49 |
xstyle | XStyle | No | Not declared | packages/react/src/utils/styled.tsx:7 |
data-slot | unknown | No | Not declared | packages/react/src/utils/styled.tsx:8 |
Callback state: PopoverRenderProps & { defaultStyle: CSSProperties; }
triggerstring | nullplacementPlacementAxis | nullisEnteringbooleanisExitingbooleandefaultStyleCSSProperties
Callback state: PopoverRenderProps & { defaultChildren: ReactNode | undefined; }
triggerstring | nullplacementPlacementAxis | nullisEnteringbooleanisExitingbooleandefaultChildrenReactNode
Callback state: PopoverRenderProps
triggerstring | nullplacementPlacementAxis | nullisEnteringbooleanisExitingboolean
ColorPickerDialog
({ xstyle, style, ...props }: StyleXProps<ComponentPropsWithRef<typeof Dialog>>): JSX.Element
packages/react/src/components/color-picker/color-picker.tsx:66
react-aria-components/ColorPicker
| Property | Type | Required | Local default | Description |
|---|---|---|---|---|
translate | undefined | "yes" | "no" | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:303 |
hidden | undefined | false | true | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:301 |
style | CSSProperties | undefined | No | Not declared | The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element.node_modules/react-aria-components/dist/types/src/utils.d.ts:110 |
slot | string | null | undefined | No | Not declared | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit `null` value indicates that the local props completely override all props received from a parent.node_modules/react-aria-components/dist/types/src/utils.d.ts:172 |
dir | string | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:299 |
ref | Ref<HTMLElement> | undefined | No | Not declared | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).node_modules/@types/react/index.d.ts:301 |
id | string | undefined | No | Not declared | The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).node_modules/@react-types/shared/src/dom.d.ts:75 |
lang | string | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:300 |
role | undefined | "dialog" | "alertdialog" | No | Not declared | The accessibility role for the dialog.node_modules/react-aria/dist/types/src/dialog/useDialog.d.ts:8 |
inert | undefined | false | true | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:302 |
aria-describedby | string | undefined | No | Not declared | Identifies the element (or elements) that describes the object.node_modules/@react-types/shared/src/dom.d.ts:51 |
aria-details | string | undefined | No | Not declared | Identifies the element (or elements) that provide a detailed, extended description for the object.node_modules/@react-types/shared/src/dom.d.ts:57 |
aria-label | string | undefined | No | Not declared | Defines a string value that labels the current element.node_modules/@react-types/shared/src/dom.d.ts:41 |
aria-labelledby | string | undefined | No | Not declared | Identifies the element (or elements) that labels the current element.node_modules/@react-types/shared/src/dom.d.ts:46 |
children | ReactNode | ((opts: DialogRenderProps) => ReactNode) | No | Not declared | Children of the dialog. A function may be provided to access a function to close the dialog.node_modules/react-aria-components/dist/types/src/Dialog.d.ts:21 |
onAuxClick | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:322 |
onAuxClickCapture | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:323 |
onClick | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:320 |
onClickCapture | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:321 |
onContextMenu | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:324 |
onContextMenuCapture | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:325 |
onDoubleClick | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:326 |
onDoubleClickCapture | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:327 |
onMouseDown | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:328 |
onMouseDownCapture | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:329 |
onMouseEnter | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:330 |
onMouseLeave | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:331 |
onMouseMove | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:332 |
onMouseMoveCapture | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:333 |
onMouseOut | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:334 |
onMouseOutCapture | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:335 |
onMouseOver | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:336 |
onMouseOverCapture | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:337 |
onMouseUp | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:338 |
onMouseUpCapture | MouseEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:339 |
onTouchCancel | TouchEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:342 |
onTouchCancelCapture | TouchEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:343 |
onTouchEnd | TouchEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:344 |
onTouchEndCapture | TouchEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:345 |
onTouchMove | TouchEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:346 |
onTouchMoveCapture | TouchEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:347 |
onTouchStart | TouchEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:348 |
onTouchStartCapture | TouchEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:349 |
onPointerDown | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:352 |
onPointerDownCapture | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:353 |
onPointerMove | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:354 |
onPointerMoveCapture | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:355 |
onPointerUp | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:356 |
onPointerUpCapture | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:357 |
onPointerCancel | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:358 |
onPointerCancelCapture | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:359 |
onPointerEnter | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:360 |
onPointerLeave | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:361 |
onPointerOver | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:362 |
onPointerOverCapture | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:363 |
onPointerOut | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:364 |
onPointerOutCapture | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:365 |
onGotPointerCapture | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:366 |
onGotPointerCaptureCapture | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:367 |
onLostPointerCapture | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:368 |
onLostPointerCaptureCapture | PointerEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:369 |
onScroll | UIEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:372 |
onScrollCapture | UIEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:373 |
onWheel | WheelEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:376 |
onWheelCapture | WheelEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:377 |
onAnimationStart | AnimationEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:380 |
onAnimationStartCapture | AnimationEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:381 |
onAnimationEnd | AnimationEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:382 |
onAnimationEndCapture | AnimationEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:383 |
onAnimationIteration | AnimationEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:384 |
onAnimationIterationCapture | AnimationEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:385 |
onTransitionCancel | TransitionEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:388 |
onTransitionCancelCapture | TransitionEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:389 |
onTransitionEnd | TransitionEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:390 |
onTransitionEndCapture | TransitionEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:391 |
onTransitionRun | TransitionEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:392 |
onTransitionRunCapture | TransitionEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:393 |
onTransitionStart | TransitionEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:394 |
onTransitionStartCapture | TransitionEventHandler<HTMLElement> | undefined | No | Not declared | node_modules/@react-types/shared/src/dom.d.ts:395 |
render | DOMRenderFunction<"section", undefined> | undefined | No | Not declared | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if `<button>` is expected, you cannot render an `<a>`). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate.node_modules/react-aria-components/dist/types/src/utils.d.ts:208 |
xstyle | XStyle | No | Not declared | packages/react/src/utils/styled.tsx:7 |
data-slot | unknown | No | Not declared | packages/react/src/utils/styled.tsx:8 |
Callback state: DialogRenderProps
close() => void
ColorPicker
({ children, xstyle, ...props }: ColorPickerRootProps): JSX.Element
packages/react/src/components/color-picker/index.ts:16
ColorPicker.Root, ColorPicker.Trigger, ColorPicker.Popover, ColorPicker.Dialog
| Property | Type | Required | Local default | Description |
|---|---|---|---|---|
slot | string | null | undefined | No | Not declared | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit `null` value indicates that the local props completely override all props received from a parent.node_modules/react-aria-components/dist/types/src/utils.d.ts:172 |
defaultValue | string | Color | undefined | No | Not declared | The default value (uncontrolled).node_modules/@react-types/shared/src/inputs.d.ts:73 |
children | ChildrenOrFunction<ColorPickerRenderProps> | Yes | Not declared | The children of the component. A function may be provided to alter the children based on component state.node_modules/react-aria-components/dist/types/src/ColorPicker.d.ts:14 |
onChange | ((value: Color) => void) | undefined | No | Not declared | Handler that is called when the value changes.node_modules/@react-types/shared/src/inputs.d.ts:75 |
value | string | Color | undefined | No | Not declared | The current value (controlled).node_modules/@react-types/shared/src/inputs.d.ts:71 |
xstyle | XStyle | No | Not declared | packages/react/src/utils/styled.tsx:7 |
data-slot | unknown | No | Not declared | packages/react/src/utils/styled.tsx:8 |
Callback state: ColorPickerRenderProps & { defaultChildren: ReactNode | undefined; }
colorColordefaultChildrenReactNode
Shared native HTML and ARIA properties
Parts with identical inherited property records share one complete table. Different native types remain separate.
Property set 1 (1)
Applies to: ColorPickerTrigger, ColorPickerPopover, ColorPickerDialog
| Property | Type | Required | Local default | Description |
|---|---|---|---|---|
key | Key | null | undefined | No | Not declared | node_modules/@types/react/index.d.ts:259 |
HeroUI v3.2.6 is the visual and historical reference, not an API compatibility promise. HeroUI v3.2.6