Skip to content

Gradient ​

<notatio-gradient name="g" value="viridis"> -- choose a color gradient: a swatch that opens the presets, each drawn, with a reverse toggle. Given band, it also sets the band — the distance in value between the gradient's two ends — and mode, how values past it meet the gradient (reflect, sweeping up and back; wrap; clamp).

The binding _g is the gradient's name as a string; notatio-gradient-change carries the whole setting, for a plot that reads all of it.

packages/components/src/notatio-gradient.ts

Props

PropTypeDefaultNotes
namestring""The binding this control drives: name="g" fills the wildcard _g.reflects
valuestring"viridis"The gradient's name: one of GRADIENTS.reflects
reversebooleanfalsereflects
bandnumber | undefinedundefinedThe band, when this control sets it; absent, the band isn't offered.
modeBandMode | undefinedundefined
unitstring""What the band measures, for its label: √|N|.

As a web component

Plain custom elements, no framework required: import @enumeratio/frontend for the side effect and write <notatio-gradient> in any HTML. Attributes are kebab-case and always strings; the props table above names each one's attribute where it differs from its prop.