Skip to main content

icon()

icon(name, options?): HTMLElement

Defined in: js-api/ui.ts:239

An icon by name: Font Awesome by default ('plus'), an SVG icon for .svg names or style: 'svg', an image for a URL, an absolute path or a data URI. See also icons for the common ones. Example: https://public.datagrok.ai/js/samples/ui/components/icons

Parameters

ParameterType
namestring
options?{ onClick?: (event) => void; style?: "image" | "svg" | "fa"; tooltip?: string; }
options.onClick?(event) => void
options.style?"image" | "svg" | "fa"
options.tooltip?string

Returns

HTMLElement