Compose the parts in the order people use them: type, preview, track, stop row, color editor, and angle. name sends the CSS text with a form.
background-gradient.tsx
GradientPicker
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | The parts. Default: type, preview, track, stop row, editor, and angle. |
| value | — | The gradient, controlled. | |
| default | DEFAULT_GRADIENT | The first gradient, uncontrolled. Default: blue to violet, linear at 90°. | |
| on | — | Each change: a type, an angle, a stop move, color, add, or remove. cancel stops it. | |
| active | string | — | The id of the stop that the editor, the position field, and Remove act on, controlled. |
| default | string | — | The first active stop. Default: the first stop from the start. |
| on | — | ||
| disabled | boolean | false | |
| name | string | — | The form name: the form sends the CSS text (linear-gradient(90deg, …)). |
| form | string | — | The form of the hidden input, for a picker outside its form. |
| labels | — | The words (GRADIENT_PICKER_LABELS). Keep the object stable. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
GradientPickerType
<div>| Prop | Type | Default | Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | |||||||||||||||||||||||||||
| full | boolean | true | |||||||||||||||||||||||||||
| orientation | "horizontal""vertical" | — | |||||||||||||||||||||||||||
| rounded | "default""full" | — | |||||||||||||||||||||||||||
| size | "default""lg""sm""xs" | "sm" | |||||||||||||||||||||||||||
From Base UIRadioGroupBase UI docs | |||||||||||||||||||||||||||||
| disabled | boolean | false | Whether the component should ignore user interaction. | ||||||||||||||||||||||||||
| read | boolean | false | Whether the user should be unable to select a different radio button in the group. | ||||||||||||||||||||||||||
| required | boolean | false | Whether the user must choose a value before submitting a form. | ||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | ||||||||||||||||||||||||||
GradientPickerPreview
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
GradientPickerTrack
<div>| Prop | Type | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||||||||||||||||||||||||||||||||||||||||
From Base UISlider.RootBase UI docs | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| disabled | boolean | false | Whether the slider should ignore user interaction. | |||||||||||||||||||||||||||||||||||||||||||||||||
| format | NumberFormatOptions | — | Options to format the value. | |||||||||||||||||||||||||||||||||||||||||||||||||
| locale | LocalesArgument | — | The locale used by Intl.NumberFormat when formatting the value. Defaults to the user's runtime locale. | |||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | |||||||||||||||||||||||||||||||||||||||||||||||||
GradientPickerStop
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
GradientPickerStopLabel
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
GradientPickerPosition
<div>| Prop | Type | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From Base UINumberField.RootBase UI docs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id | string | — | The id of the input element. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| allow | boolean | false | When true, direct text entry may be outside the min/max range without clamping, so native range underflow/overflow validation can occur. Step-based interactions (keyboard arrows, buttons, wheel, scrub) still clamp. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| small | number | 0.1 | The small step value of the input element when incrementing while the alt key is held. Snaps to multiples of this value when snapOnStep is enabled. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GradientPickerAdd
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
GradientPickerRemove
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
GradientPickerEditor
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
GradientPickerAngle
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| on | — | The end of a change: a release, a key, a typed value. Not on Escape. | |
| range | "signed""wrap" | — | wrap (default): 0 to 359. signed: −180 to 180. Both wrap at the ends. |
| step | number | — | The step of a drag and of the arrow keys, in degrees. Use a step that divides 360. Default 1. |
| snap | number | — | The snap of Shift (a drag and Shift + arrow), in degrees. Default 15. Use a multiple of step: the value then snaps to the step grid, which would undo a snap between two steps. |
| variant | "default""row" | "row" | default: the dial beside its text. row: a 32px panel row with a 24px dial at the end. |
| size | "default""lg""sm" | — | The dial: sm 24, default 64, lg 96. In a row: the row height, 28, 32, or 36. |
| disabled | boolean | — | |
| read | boolean | — | The value shows and can be focused, read, and submitted, but not changed. |
| name | string | — | The form name of the hidden range input. |
| form | string | — | The form of the hidden range input, for a dial outside its form. |
| locale | string | — | The locale of the number format. |
| format | NumberFormatOptions | — | The format of the shown value. Default: the narrow degree unit with the digits of the step. |
| get | — | The spoken value (aria-valuetext). Default: "135 degrees" in the locale. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
| Arrow keys | Moves the focused stop 1%. |
|---|---|
| Shiftarrow keys | Moves the focused stop 10%. |
| HomeorEnd | Moves the focused stop to the next stop, or to the end. |
| DeleteorBackspace | Removes the focused stop. A gradient keeps 2 stops. |
Built with
Installs with Gradient Picker
- Components
- Angle Dial,Button,Color Area,Color Field,Color Picker,Color Slider,Direction,Number Field+ 1 more









