Founding price: $35, then $79.99 after 23:59 UTC on 4 November, then $79.99
Get ProBuild a CSS gradient: linear, radial or conic, with draggable and keyboard-movable color stops, add and remove, an angle control, a color editor per stop and copyable CSS.
This item has no props to tune. Use the lens above to change theme, density, direction and more.
| Export | Description |
|---|---|
GradientPicker | The editor. |
gradientToCss(value) | The background-image value. |
colorAt(stops, position) | The mixed color at a position. |
| Prop | Type | Default | Description |
|---|---|---|---|
value / onChange | { type, angle, stops: { id, color, position }[] } | - | type is linear, radial or conic; position is 0 to 100. |
minStops, maxStops | number | 2, 8 | Limits for remove and add. |
role="slider" button with a name ("Stop 2 of 3, #7c3aed") and a value in percent. Arrow keys move it by 1, Shift by 10, Home and End go to the ends, Delete removes it (not below the minimum). Dragging with a pointer does the same.The component ships with a Testing Library test (gradient-picker.test.tsx) that covers: its main behaviour, the keyboard path and the error or empty states.