Package-level declarations

Types

Link copied to clipboard

Attribute names of <vaadin-icon>, for use with setAttribute.

Link copied to clipboard

<vaadin-icon> is a Web Component for displaying SVG icons.

Link copied to clipboard
external interface IconFontSizeMixin

Mixin which enables the font icon sizing fallback for browsers that do not support CSS Container Queries. In older versions of Safari, it didn't support Container Queries units used in pseudo-elements. It has been fixed in recent versions, but there's an regression in Safari 26, which caused the same issue to happen when the icon is attached to an element with shadow root. The mixin does nothing if the browser supports CSS Container Query units for pseudo elements.

Link copied to clipboard
external interface IconMixin : IconFontSizeMixin
Link copied to clipboard
object Iconset
Link copied to clipboard

Attribute names of <vaadin-iconset>, for use with setAttribute.

Link copied to clipboard
abstract external class IconsetElement : HTMLElement, IconsetMixin

<vaadin-iconset> is a Web Component for creating SVG icon collections.

Link copied to clipboard
external interface IconsetMixin
Link copied to clipboard
external interface IconSvgInfo

An icon of a registered iconset, as returned by Iconset.getIconSvg.

Link copied to clipboard
typealias IconSvgLiteral = JsAny

An SVG literal produced by Lit's svg tagged template: an SVGTemplateResult, or the nothing sentinel when there is no content.

Functions

Link copied to clipboard
external fun cloneSvgNode(source: Element): IconSvgLiteral

Clone given node and return its content as SVG literal.

Link copied to clipboard
fun createIcon(configure: IconElement.() -> Unit = {}): IconElement

Creates a <vaadin-icon> element. The custom element is registered on first use.

Link copied to clipboard
fun createIconset(configure: IconsetElement.() -> Unit = {}): IconsetElement

Creates a <vaadin-iconset> element. The custom element is registered on first use.

Link copied to clipboard
external fun ensureSvgLiteral(source: JsAny?): IconSvgLiteral

Create a valid SVG literal based on the argument.

Link copied to clipboard
external fun isValidSvg(source: JsAny?): Boolean

Test if the given argument is a valid SVG literal.

Link copied to clipboard

Checks if the current browser needs a fallback for sizing font icons instead of relying on CSS Container Queries.

Link copied to clipboard

Imports @vaadin/icon/src/vaadin-icon.js, registering <vaadin-icon>, and returns the element class.

Link copied to clipboard

Imports @vaadin/icon/src/vaadin-iconset.js, registering <vaadin-iconset>, and returns the element class.

Link copied to clipboard

Checks if the current browser supports CSS Container Query units for pseudo elements. i.e. if the fix for https://bugs.webkit.org/show_bug.cgi?id=253939 is available.

Link copied to clipboard
external fun unsafeSvgLiteral(source: String): IconSvgLiteral

Create an SVG literal from source string.