@fds-components-public/fds-gradient-editor
v1.0.10
Published
Simple gradient editor made with Svelte as Web Component so it can be used in Gyre form editor as an element for the Gyre user interface.
Downloads
10
Readme
fds-gradient-editor
Simple gradient editor made with Svelte as Web Component so it can be used in Gyre form editor as an element for the Gyre user interface.
Installation
npm i @fds-components-public/fds-gradient-editor
Usage
<script src="<Path>/fds-gradient-editor.js"></script>
<fds-gradient-editor value="gradient definitions"></fds-gradient-editor>
Example
<fds-gradient-editor value="0:255,0,0
25:255,255,255
50:0,255,0
75:0,0,255" onchange="console.log(this.value)"></fds-gradient-editor>
produces output
So value is a list with gradient stops (0 to 100 max) a colon and color for each line.