An HEX value color picker.
The color picker primarily takes a CSS HEX string representing any color. Users can adjust the color by changing the saturation, value, or hue of the HEX value.
Inside the component, colors are represented in the HSV color space, as HEX color codes are lossy when it comes to, specifically, hue.
At this time, users can't directly input hue, saturation, value, or alpha values.
By default, the color cannot be null and users can't clear the color value. When it makes sense, the color picker can allow the color to be cleared (with an x button in the HEX input) and set to null. To allow null and allow the color to be cleared in the HEX input, set isClearable to true.
When the color picker shouldn't accept any changes by the user, set isDisabled to true. Users will still be able to open the color picker, but won't be able to change the hue, saturation/value, or HEX values.
PlumaColorPicker extends BoxAdditional middleware to apply to Floating UI, for example custom middleware for more control. These will be applied after the default middleware.
Default:125
The duration (in ms) for the popover animation.
The currently selected color. This component does not manage this state for you and you must manage the selected color yourself.
It should be a CSS HEX color value without an alpha channel.
Whether the popover should be open initially
Default:['content']
The order in which focus should be moved when navigating through the popover. See Floating UI for more details.
Default:0
Which element to initially focus when the popover is opened.
Can be a number (a tabbable index as specified by focusOrder) or an HTMLElement.
See Floating UI for more details.
Default:false
Whether to allow the user to clear the color or not. Defaults to false.
Default:false
Whether the color picker should be disabled. Defaults to false.
Default:false
Whether the popover should be draggable.
Default:false
Whether the focus manager (for the opened popover) should be disabled entirely. See Floating UI for more details.
Whether the popover should be open. Only use this along with onOpenChange if you want to control the state of the popover
The function called when the user changes the color. Use this to update
the current color state. If isClearable is set to true, the color passed
into the function can be null
Called when the open state of the popover is changing
Where the popover should be placed in relation to the trigger
Default:true
Whether focusout event listeners are attached to the trigger and popover,
to close the popover when focus moves outside of it.
See Floating UI for more details.
Default:true
Whether the focus guards are rendered by the focus manager. See Floating UI for more details.
Default:true
Whether the popover content's max width and/or max height should be restricted using the Floating UI size middleware.
By default, this is enabled, to prevent popovers from growing larger than the available viewport size.
Default:true
Whether focus should be returned to the trigger when the popover is closed. See Floating UI for more details.
Default:false
Whether visually hidden close buttons are rendered before and after the popover. See Floating UI for more details.
Default:false
If the popover contains interactive elements, the dialog pattern should be applied.
Enable shouldTrapFocus to ensure focus is kept within the popover while it's open.
See Floating UI for more details.
Default:true
Whether the popover should open when the trigger is clicked. This is the recommended default.
Default:false
Whether the popover should open when the trigger is focused.
Defaults to true when shouldTriggerOnHover is true.
Default:false
Whether the popover should open when the trigger is hovered. Only use if absolutely necessary, as Popovers are meant to be triggered by clicks.
The position CSS property to use on the floating element
Additional classes to apply on the popover component (the floating element, not the trigger). Should only be used as a last resort
Additional classes to apply on the popover content component. Should only be used as a last resort
Additional inline styles to apply on the popover component (the floating element, not the trigger). Should only be used as a last resort
An internal function to pass the Floating UI nodeId up to a parent if necessary.
Default:false
Whether "typeahead" functionality should be enabled, which focuses items while typing.
See Floating UI for more details.
Enabled by default when shouldNavigateList is true.