Gradient
A gradient being made: its stops on a bar, the stop in hand in a color picker, and its type, angle and center.
On this page
A gradient editor makes a gradient: its stops on a bar, the stop in hand in a color picker, and its type, angle and center. Every control in it is the library's own: the color picker, a slider and a number for a stop's place, a segmented control for the type, a dial for the angle, numbers for the center. What the gradient adds is the bar of stops, the preview and the gradient behavior that keeps them all in step.
Gradient
<div class="gradient max-w(640) mx-auto" id="sunrise" role="group" aria-label="Background gradient" style="--gradient-ratio: 3 / 1"> <div class="gradient-preview" aria-hidden="true"></div> <div class="gradient-bar"></div> <div class="flex flex-wrap items-center gap-xs"> <button type="button" class="btn btn-sm gradient-add"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M3 8L13 8" /><path d="M8 3L8 13" /> </svg>Add a stop </button> <button type="button" class="btn btn-sm gradient-remove"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M3 8L13 8" /> </svg>Remove </button> <button type="button" class="btn btn-sm btn-quiet gradient-reverse"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M8 1.6667L8 14.3333" /><path d="M5.6667 6.3298L5.6667 11.45A0.55 0.55 0 0 1 5.1167 12L2.5566 12A0.55 0.55 0 0 1 2.0647 11.204L4.6248 6.0839A0.55 0.55 0 0 1 5.6667 6.3298Z" /><path d="M10.3333 6.3298L10.3333 11.45A0.55 0.55 0 0 0 10.8833 12L13.4434 12A0.55 0.55 0 0 0 13.9353 11.204L11.3752 6.0839A0.55 0.55 0 0 0 10.3333 6.3298Z" /> </svg>Reverse </button> </div> <div class="gradient-fields"> <fieldset class="gradient-color"> <legend class="mb(6) text-xs font-medium fg-text-muted">Color of the stop</legend> <div class="color-picker" style="--color-picker-lightness: .7; --color-picker-chroma: .19; --color-picker-hue: 50"> <div class="color-picker-area"> <div class="color-picker-thumb" role="slider" tabindex="0" aria-label="Lightness and chroma" aria-valuemin="0" aria-valuemax="100" aria-valuenow="70"></div> </div> <span class="swatch swatch-lg color-picker-swatch"></span> <input type="range" class="slider color-picker-hue" min="0" max="360" value="50" aria-label="Hue"> <input type="range" class="slider color-picker-alpha" min="0" max="100" value="100" aria-label="Opacity"> <div class="color-picker-fields"> <select class="select select-sm color-picker-format" aria-label="Format"> <option value="hex" selected>Hex</option> <option value="rgb">RGB</option> <option value="oklch">OKLCH</option> </select> <input class="input input-sm color-picker-text" value="#ff6a00" aria-label="Color" spellcheck="false" autocomplete="off"> </div> </div> </fieldset> <div class="flex flex-col gap-md min-w(0)"> <fieldset class="gradient-offset"> <legend class="mb(6) text-xs font-medium fg-text-muted">Position</legend> <input type="range" class="slider" min="0" max="100" step="1" value="0" aria-label="Position of the stop"> <input type="number" class="input input-sm w(72)" min="0" max="100" step="1" value="0" aria-label="Position of the stop, in percent"> </fieldset> <fieldset class="gradient-type"> <legend class="mb(6) text-xs font-medium fg-text-muted">Type</legend> <div class="segmented segmented-sm" role="radiogroup" aria-label="Type"> <label class="segmented-item"> <input type="radio" class="segmented-input" name="sunrise-type" value="linear" checked>Linear </label> <label class="segmented-item"> <input type="radio" class="segmented-input" name="sunrise-type" value="radial">Radial </label> <label class="segmented-item"> <input type="radio" class="segmented-input" name="sunrise-type" value="conic">Conic </label> </div> </fieldset> <div class="flex flex-wrap items-start gap-lg"> <fieldset class="gradient-angle"> <legend class="mb(6) text-xs font-medium fg-text-muted">Angle</legend> <div class="dial dial-sm dial-full" role="slider" tabindex="0" aria-label="Angle" aria-valuenow="135" aria-valuemin="0" aria-valuemax="360" aria-valuetext="135°" style="--dial-value: 135"> <span class="dial-value">135°</span> <span class="dial-thumb"></span> </div> </fieldset> <fieldset class="gradient-center"> <legend class="mb(6) text-xs font-medium fg-text-muted">Center</legend> <input type="number" class="input input-sm w(72)" min="0" max="100" value="50" aria-label="Center across, in percent"> <input type="number" class="input input-sm w(72)" min="0" max="100" value="50" aria-label="Center down, in percent"> </fieldset> </div> </div> </div> <pre class="code-block gradient-css" role="region" tabindex="0" aria-label="The gradient as CSS"></pre></div><script>addEventListener('DOMContentLoaded', function () {MasterUI.gradient(document.getElementById('sunrise'), { value: { type: 'linear', angle: 135, center: [50, 50], stops: [ { id: 'dawn', offset: 0, color: '#ff6a00' }, { id: 'noon', offset: 55, color: '#ee0979' }, { id: 'dusk', offset: 100, color: '#4f46e5' }] } })})</script><script type="module"> import { attach } from '@master/ui/behaviors' attach()</script>import { useEffect, useRef } from 'react'import { attach, gradient } from '@master/ui/behaviors'import PlusIcon from '@master/icons-react/native/16/soft/plus'import MinusIcon from '@master/icons-react/native/16/soft/minus'import FlipHorizontalIcon from '@master/icons-react/native/16/soft/flip-horizontal'export function Example() { const root = useRef<HTMLDivElement>(null) useEffect(() => { const detach = [ attach(root.current!), gradient(document.getElementById('sunrise')!, { value: { type: 'linear', angle: 135, center: [50, 50], stops: [ { id: 'dawn', offset: 0, color: '#ff6a00' }, { id: 'noon', offset: 55, color: '#ee0979' }, { id: 'dusk', offset: 100, color: '#4f46e5' } ] } }), ] return () => detach.forEach(stop => stop()) }, []) return ( <div ref={root} className="gradient max-w(640) mx-auto" id="sunrise" role="group" aria-label="Background gradient" style={{ '--gradient-ratio': '3 / 1' } as React.CSSProperties}> <div className="gradient-preview" aria-hidden="true"></div> <div className="gradient-bar"></div> <div className="flex flex-wrap items-center gap-xs"> <button type="button" className="btn btn-sm gradient-add"> <PlusIcon className="icon" />Add a stop </button> <button type="button" className="btn btn-sm gradient-remove"> <MinusIcon className="icon" />Remove </button> <button type="button" className="btn btn-sm btn-quiet gradient-reverse"> <FlipHorizontalIcon className="icon" />Reverse </button> </div> <div className="gradient-fields"> <fieldset className="gradient-color"> <legend className="mb(6) text-xs font-medium fg-text-muted">Color of the stop</legend> <div className="color-picker" style={{ '--color-picker-lightness': '.7', '--color-picker-chroma': '.19', '--color-picker-hue': '50' } as React.CSSProperties}> <div className="color-picker-area"> <div className="color-picker-thumb" role="slider" tabIndex={0} aria-label="Lightness and chroma" aria-valuemin={0} aria-valuemax={100} aria-valuenow={70}></div> </div> <span className="swatch swatch-lg color-picker-swatch"></span> <input type="range" className="slider color-picker-hue" min="0" max="360" defaultValue="50" aria-label="Hue" /> <input type="range" className="slider color-picker-alpha" min="0" max="100" defaultValue="100" aria-label="Opacity" /> <div className="color-picker-fields"> <select className="select select-sm color-picker-format" aria-label="Format" defaultValue="hex"> <option value="hex">Hex</option> <option value="rgb">RGB</option> <option value="oklch">OKLCH</option> </select> <input className="input input-sm color-picker-text" defaultValue="#ff6a00" aria-label="Color" spellCheck="false" autoComplete="off" /> </div> </div> </fieldset> <div className="flex flex-col gap-md min-w(0)"> <fieldset className="gradient-offset"> <legend className="mb(6) text-xs font-medium fg-text-muted">Position</legend> <input type="range" className="slider" min="0" max="100" step="1" defaultValue="0" aria-label="Position of the stop" /> <input type="number" className="input input-sm w(72)" min="0" max="100" step="1" defaultValue="0" aria-label="Position of the stop, in percent" /> </fieldset> <fieldset className="gradient-type"> <legend className="mb(6) text-xs font-medium fg-text-muted">Type</legend> <div className="segmented segmented-sm" role="radiogroup" aria-label="Type"> <label className="segmented-item"> <input type="radio" className="segmented-input" name="sunrise-type" value="linear" defaultChecked />Linear </label> <label className="segmented-item"> <input type="radio" className="segmented-input" name="sunrise-type" value="radial" />Radial </label> <label className="segmented-item"> <input type="radio" className="segmented-input" name="sunrise-type" value="conic" />Conic </label> </div> </fieldset> <div className="flex flex-wrap items-start gap-lg"> <fieldset className="gradient-angle"> <legend className="mb(6) text-xs font-medium fg-text-muted">Angle</legend> <div className="dial dial-sm dial-full" role="slider" tabIndex={0} aria-label="Angle" aria-valuenow={135} aria-valuemin={0} aria-valuemax={360} aria-valuetext="135°" style={{ '--dial-value': '135' } as React.CSSProperties}> <span className="dial-value">135°</span> <span className="dial-thumb"></span> </div> </fieldset> <fieldset className="gradient-center"> <legend className="mb(6) text-xs font-medium fg-text-muted">Center</legend> <input type="number" className="input input-sm w(72)" min="0" max="100" defaultValue="50" aria-label="Center across, in percent" /> <input type="number" className="input input-sm w(72)" min="0" max="100" defaultValue="50" aria-label="Center down, in percent" /> </fieldset> </div> </div> </div> <pre className="code-block gradient-css" role="region" tabIndex={0} aria-label="The gradient as CSS">{``}</pre> </div> )}<script> import { attach, gradient } from '@master/ui/behaviors' import PlusIcon from '@master/icons-svelte/native/16/soft/plus' import MinusIcon from '@master/icons-svelte/native/16/soft/minus' import FlipHorizontalIcon from '@master/icons-svelte/native/16/soft/flip-horizontal' function mounted(root) { const detach = [ attach(root), gradient(document.getElementById('sunrise'), { value: { type: 'linear', angle: 135, center: [50, 50], stops: [ { id: 'dawn', offset: 0, color: '#ff6a00' }, { id: 'noon', offset: 55, color: '#ee0979' }, { id: 'dusk', offset: 100, color: '#4f46e5' } ] } }), ] return () => detach.forEach(stop => stop()) }</script><div class="gradient max-w(640) mx-auto" id="sunrise" role="group" aria-label="Background gradient" style="--gradient-ratio: 3 / 1" {@attach mounted}> <div class="gradient-preview" aria-hidden="true"></div> <div class="gradient-bar"></div> <div class="flex flex-wrap items-center gap-xs"> <button type="button" class="btn btn-sm gradient-add"> <PlusIcon class="icon" />Add a stop </button> <button type="button" class="btn btn-sm gradient-remove"> <MinusIcon class="icon" />Remove </button> <button type="button" class="btn btn-sm btn-quiet gradient-reverse"> <FlipHorizontalIcon class="icon" />Reverse </button> </div> <div class="gradient-fields"> <fieldset class="gradient-color"> <legend class="mb(6) text-xs font-medium fg-text-muted">Color of the stop</legend> <div class="color-picker" style="--color-picker-lightness: .7; --color-picker-chroma: .19; --color-picker-hue: 50"> <div class="color-picker-area"> <div class="color-picker-thumb" role="slider" tabindex="0" aria-label="Lightness and chroma" aria-valuemin="0" aria-valuemax="100" aria-valuenow="70"></div> </div> <span class="swatch swatch-lg color-picker-swatch"></span> <input type="range" class="slider color-picker-hue" min="0" max="360" value="50" aria-label="Hue"> <input type="range" class="slider color-picker-alpha" min="0" max="100" value="100" aria-label="Opacity"> <div class="color-picker-fields"> <select class="select select-sm color-picker-format" aria-label="Format"> <option value="hex" selected>Hex</option> <option value="rgb">RGB</option> <option value="oklch">OKLCH</option> </select> <input class="input input-sm color-picker-text" value="#ff6a00" aria-label="Color" spellcheck="false" autocomplete="off"> </div> </div> </fieldset> <div class="flex flex-col gap-md min-w(0)"> <fieldset class="gradient-offset"> <legend class="mb(6) text-xs font-medium fg-text-muted">Position</legend> <input type="range" class="slider" min="0" max="100" step="1" value="0" aria-label="Position of the stop"> <input type="number" class="input input-sm w(72)" min="0" max="100" step="1" value="0" aria-label="Position of the stop, in percent"> </fieldset> <fieldset class="gradient-type"> <legend class="mb(6) text-xs font-medium fg-text-muted">Type</legend> <div class="segmented segmented-sm" role="radiogroup" aria-label="Type"> <label class="segmented-item"> <input type="radio" class="segmented-input" name="sunrise-type" value="linear" checked>Linear </label> <label class="segmented-item"> <input type="radio" class="segmented-input" name="sunrise-type" value="radial">Radial </label> <label class="segmented-item"> <input type="radio" class="segmented-input" name="sunrise-type" value="conic">Conic </label> </div> </fieldset> <div class="flex flex-wrap items-start gap-lg"> <fieldset class="gradient-angle"> <legend class="mb(6) text-xs font-medium fg-text-muted">Angle</legend> <div class="dial dial-sm dial-full" role="slider" tabindex="0" aria-label="Angle" aria-valuenow="135" aria-valuemin="0" aria-valuemax="360" aria-valuetext="135°" style="--dial-value: 135"> <span class="dial-value">135°</span> <span class="dial-thumb"></span> </div> </fieldset> <fieldset class="gradient-center"> <legend class="mb(6) text-xs font-medium fg-text-muted">Center</legend> <input type="number" class="input input-sm w(72)" min="0" max="100" value="50" aria-label="Center across, in percent"> <input type="number" class="input input-sm w(72)" min="0" max="100" value="50" aria-label="Center down, in percent"> </fieldset> </div> </div> </div> <pre class="code-block gradient-css" role="region" tabindex="0" aria-label="The gradient as CSS"></pre></div><script setup>import { onMounted, onUnmounted, ref } from 'vue'import { attach, gradient } from '@master/ui/behaviors'import PlusIcon from '@master/icons-vue/native/16/soft/plus'import MinusIcon from '@master/icons-vue/native/16/soft/minus'import FlipHorizontalIcon from '@master/icons-vue/native/16/soft/flip-horizontal'const root = ref(null)let detach = []onMounted(() => { detach = [ attach(root.value), gradient(document.getElementById('sunrise'), { value: { type: 'linear', angle: 135, center: [50, 50], stops: [ { id: 'dawn', offset: 0, color: '#ff6a00' }, { id: 'noon', offset: 55, color: '#ee0979' }, { id: 'dusk', offset: 100, color: '#4f46e5' } ] } }), ]})onUnmounted(() => detach.forEach(stop => stop()))</script><template> <div ref="root" class="gradient max-w(640) mx-auto" id="sunrise" role="group" aria-label="Background gradient" style="--gradient-ratio: 3 / 1"> <div class="gradient-preview" aria-hidden="true"></div> <div class="gradient-bar"></div> <div class="flex flex-wrap items-center gap-xs"> <button type="button" class="btn btn-sm gradient-add"> <PlusIcon class="icon" />Add a stop </button> <button type="button" class="btn btn-sm gradient-remove"> <MinusIcon class="icon" />Remove </button> <button type="button" class="btn btn-sm btn-quiet gradient-reverse"> <FlipHorizontalIcon class="icon" />Reverse </button> </div> <div class="gradient-fields"> <fieldset class="gradient-color"> <legend class="mb(6) text-xs font-medium fg-text-muted">Color of the stop</legend> <div class="color-picker" style="--color-picker-lightness: .7; --color-picker-chroma: .19; --color-picker-hue: 50"> <div class="color-picker-area"> <div class="color-picker-thumb" role="slider" tabindex="0" aria-label="Lightness and chroma" aria-valuemin="0" aria-valuemax="100" aria-valuenow="70"></div> </div> <span class="swatch swatch-lg color-picker-swatch"></span> <input type="range" class="slider color-picker-hue" min="0" max="360" value="50" aria-label="Hue"> <input type="range" class="slider color-picker-alpha" min="0" max="100" value="100" aria-label="Opacity"> <div class="color-picker-fields"> <select class="select select-sm color-picker-format" aria-label="Format"> <option value="hex" selected>Hex</option> <option value="rgb">RGB</option> <option value="oklch">OKLCH</option> </select> <input class="input input-sm color-picker-text" value="#ff6a00" aria-label="Color" spellcheck="false" autocomplete="off"> </div> </div> </fieldset> <div class="flex flex-col gap-md min-w(0)"> <fieldset class="gradient-offset"> <legend class="mb(6) text-xs font-medium fg-text-muted">Position</legend> <input type="range" class="slider" min="0" max="100" step="1" value="0" aria-label="Position of the stop"> <input type="number" class="input input-sm w(72)" min="0" max="100" step="1" value="0" aria-label="Position of the stop, in percent"> </fieldset> <fieldset class="gradient-type"> <legend class="mb(6) text-xs font-medium fg-text-muted">Type</legend> <div class="segmented segmented-sm" role="radiogroup" aria-label="Type"> <label class="segmented-item"> <input type="radio" class="segmented-input" name="sunrise-type" value="linear" checked>Linear </label> <label class="segmented-item"> <input type="radio" class="segmented-input" name="sunrise-type" value="radial">Radial </label> <label class="segmented-item"> <input type="radio" class="segmented-input" name="sunrise-type" value="conic">Conic </label> </div> </fieldset> <div class="flex flex-wrap items-start gap-lg"> <fieldset class="gradient-angle"> <legend class="mb(6) text-xs font-medium fg-text-muted">Angle</legend> <div class="dial dial-sm dial-full" role="slider" tabindex="0" aria-label="Angle" aria-valuenow="135" aria-valuemin="0" aria-valuemax="360" aria-valuetext="135°" style="--dial-value: 135"> <span class="dial-value">135°</span> <span class="dial-thumb"></span> </div> </fieldset> <fieldset class="gradient-center"> <legend class="mb(6) text-xs font-medium fg-text-muted">Center</legend> <input type="number" class="input input-sm w(72)" min="0" max="100" value="50" aria-label="Center across, in percent"> <input type="number" class="input input-sm w(72)" min="0" max="100" value="50" aria-label="Center down, in percent"> </fieldset> </div> </div> </div> <pre class="code-block gradient-css" role="region" tabindex="0" aria-label="The gradient as CSS"></pre> </div></template>#The value
The gradient is a value of four parts:
| Part | Is |
|---|---|
type | linear, radial or conic |
angle | Degrees, for a linear and a conic gradient |
center | Two percentages, for a radial and a conic gradient |
stops | Each with an id that stays with it, an offset from 0 to 100 and a color |
A color is written as the color picker writes it, as sRGB in hex with its opacity. gradientCss(value) writes the gradient as CSS, and both the preview and the copied text come from it: interpolated in OKLab where the browser can be told to, after a fallback for where it cannot.
background-image: linear-gradient(90deg, #ff6a00 0%, #ee0979 100%);background-image: linear-gradient(in oklab 90deg, #ff6a00 0%, #ee0979 100%);No CSS is read back: the editor holds the value, and an application stores the value, not the text.
#The stops
- A stop's handle is a slider of its offset, a disc of its color on the bar. A press takes it in hand and a drag moves it; the arrow keys move it by one, by ten with Shift, and Home and End take it to the ends. The stop in hand is
aria-current="true"; it stands a little forward with an ink ring. - Stops may cross. A stop moved past another keeps its id and its handle keeps focus; the gradient paints them in the order of their offsets. Two stops at one offset make a hard edge, and keep their order.
- Adding puts a stop of the color in hand ten points after it, at 100 at most. Removing, with the button or Delete, hands focus to the next stop on the bar, or the one before. Two stops are the least: at two, removing is disabled.
- Reversing turns the stops round: each offset becomes 100 less itself.
Dragging is never the only way: the offset has a range and a number beside it, and every stop is reached with Tab.
#States
aria-readonly="true" on the root shows a gradient that cannot be changed, and aria-disabled="true" one that is not in use: the handles stay where they are, and the controls are disabled.
#The behavior
import { gradient, gradientCss } from '@master/ui/behaviors/gradient.js'const editor = gradient(document.querySelector('.gradient'), { value: { type: 'linear', angle: 90, center: [50, 50], stops: [ { id: 'from', offset: 0, color: '#ff6a00' }, { id: 'to', offset: 100, color: '#ee0979' }, ] },})editor.value // the value as abovegradientCss(editor.value).text // the two lines to copyThe reader's moves dispatch input while they go on and change when they end; setting value shows another gradient and dispatches nothing. The behavior writes the handles from the value, so a framework that writes them itself gives draw. It publishes the gradient as --gradient and --gradient-fallback on the root, and each stop as --gradient-offset and --gradient-color on its handle: what the editor paints is its content, and the stylesheet places it.
#Keyboard
| Keys | Action |
|---|---|
| Tab | Moves to the stop in hand on the bar, then through the controls; the other stops are reached by taking them in hand with the pointer or from their place in the tab order of the bar |
| ArrowRight, ArrowUp | On a stop: moves it one point toward the end; ten with Shift. ArrowRight goes left where the page runs right to left |
| ArrowLeft, ArrowDown | On a stop: moves it one point toward the start; ten with Shift |
| PageUp, PageDown | On a stop: moves it ten points |
| Home, End | On a stop: moves it to 0 or to 100 |
| Delete, Backspace | On a stop: removes it while there are more than two, and hands focus to its neighbor |
#Accessibility
- Each handle is named with its place among the stops and says its offset and its color in
aria-valuetext. - The preview is a picture of the value: hide it from assistive technology, since the stops and the CSS say the same.
- In forced colors the gradient keeps its own colors, since they are its content, and the handles and the bar are outlined in system colors.
#React, Svelte and Vue
The gradient component writes the handles and the controls from the value and attaches the behavior. Copy it into the project with npx master-ui add gradient; React, Svelte and Vue says how the components are built and used.
#Classes
| Class | Description |
|---|---|
gradient | The editor: a preview, a bar of stops and the controls. The gradient behavior writes the stops' handles and publishes the gradient. Mark aria-readonly="true" or aria-disabled="true" on it to keep it from changing |
gradient-preview | The gradient over a checkerboard, 16 : 9 unless --gradient-ratio says otherwise; hide it with aria-hidden, since the stops and the CSS say the same |
gradient-bar | The stops from start to end, whatever the type, as a short well the handles stand on |
gradient-stop | A stop's handle, written by the behavior: a disc of its color in a pearl ring at --gradient-offset along the bar, a slider of the offset named with its place among the stops |
gradient-fields | The controls, in one column, and two side by side when the room allows |
gradient-color | Holds the color-picker of the stop in hand; the gradient behavior attaches the picker |
gradient-offset | Holds a range and a number input, from 0 to 100, for the offset of the stop in hand |
gradient-type | Holds the radios, linear, radial and conic, that choose the type; a segmented control |
gradient-angle | Holds a dial of the angle, from 0 to 360 degrees, for a linear and a conic gradient |
gradient-center | Holds two number inputs, the centre's x and y in percent, for a radial and a conic gradient |
gradient-add | Adds a stop of the color in hand ten points after it, 100 at most |
gradient-remove | Removes the stop in hand; disabled at two stops |
gradient-reverse | Turns the stops round |
gradient-css | The gradient as CSS to copy, written by the behavior: the fallback, then the line interpolated in OKLab |
#Custom properties
| Property | Default | Description |
|---|---|---|
--gradient | none | The gradient interpolated in OKLab, written by the behavior |
--gradient-fallback | none | The gradient interpolated in sRGB, for a browser that cannot be told how to interpolate |
--gradient-bar | The bar's paint: every stop from start to end as a straight gradient in sRGB, whatever the type, written by the behaviorSet on gradient | |
--gradient-ratio | The preview's shape; 16 / 9 by defaultSet on gradient-preview | |
--gradient-offset | Where a handle stands along the bar, from 0 to 100, written by the behaviorSet on gradient-stop | |
--gradient-color | The color of a handle's stop, written by the behaviorSet on gradient-stop |
#Related
- Color pickerAny color, chosen on a field of lightness and chroma, a hue and an opacity, or typed.
- DialA value set by turning a thumb around a circle.
- SliderA native range input: a thin well with a pearl thumb.
- Segmented controlA few options in one well; a sheet glides to the current one.
- SwatchA color to look at or to pick, as a disc with a finished edge.