Documents

IMAGE (ICON)

The image namespace contains functions that return an icon and are only assigned to the image property

image.glyph

Return font icon with color and size option.

Syntax

image.glyph(0xE00B)
image.glyph(\uE00B)
image.glyph("\uE00B")
image.glyph("\xE00B")

image.glyph(0xE00B, #0000ff)
image.glyph(0xE00B, #0000ff, 10)
image.glyph(0xE00B, #0000ff, 12, "Segoe MDL2 Assets")
image.res

Returns an icon through a path or through resources.

Syntax

image.res(path)
image.res(path, index)
image.res(path, -id)

image(path)
image(path, index)
image(path, -id)
image.svg, image.svgf

Returns an svg image via a string or from a file path.

Syntax

image.svg('<svg viewBox="0 0 100 100"><path fill="red" d="M0 0 L 100 0 L50 100 Z"/></svg>')
image.svgf(path)
image.rect

Returns a colored rectangle icon of an optional size.

Syntax

image.rect(#0000ff)
image.rect(#0000ff, 10)
image.segoe

Returns a glyph from "Segoe Fluent Icons" if present then "Segoe MDL2 Assets".

Syntax

image.segoe(\uxxxx)
image.segoe(\uxxxx, 10)
image.fluent

Returns a glyph from "Segoe Fluent Icons" with optional size.

Syntax

image.fluent(\uxxxx)
image.fluent(\uxxxx, 10)
image.mdl

Returns a glyph from "Segoe MDL2 Assets" with optional size.

Syntax

image.mdl(\uxxxx)
image.mdl(\uxxxx, 10)
image.default

Syntax

image.default

This page is open source. Noticed a typo? Or something unclear?
Improve this page on GitHub