Provides state management for a color field component. Color fields allow users to enter and adjust a hex color value.
useColorFieldState( (props: ColorFieldProps )): ColorFieldState
The current text value of the input. Updated as the user types,
and formatted according to
The currently parsed color value, or null if the field is empty.
Updated based on the
|Sets the current text value of the input.|
Updates the input value based on the currently parsed color value. Typically this is called when the field is blurred.
|Increments the current input value to the next step boundary, and fires |
|Decrements the current input value to the next step boundary, and fires |
|Sets the current value to the maximum color value, and fires |
|Sets the current value to the minimum color value, and fires |
Validates a user input string. Values can be partially entered, and may be valid even if they cannot currently be parsed to a color. Can be used to implement validation as a user types.
See the docs for useColorField in react-aria for an example of