charton API / @chart-on/ui / index / IconSource
Type Alias: IconSource
IconSource =
string|SVGElement|IconNode| (() =>Element)
Defined in: ui/src/dom.ts:47
An icon for a toolbar, rail, menu or button:
- SVG markup (
'<svg viewBox="0 0 24 24">…</svg>'), built with DOM calls; scripts, links and inline styles are dropped, - an
SVGElement, copied for each control that shows it, - an
IconNode, like the built-in icons, - or a function returning a fresh element on each call (an image, a canvas…), used as is.
Markup and elements are sized to the control and hidden from assistive technology, since the control carries the label.