Icon Sprite

Renders an icon using an SVG sprite.

Read more Read less

Maturity: Refining

Usage

Render an icon with a visually hidden label:

<.icon_sprite name="arrow-left" label="Go back" />

To display the label visibly:

<.icon_sprite name="arrow-left" label="Go back" label_position="after" />
متن بعد از نماد
متن قبل از نماد
متن مخفی
Attribute Type Documentation Default Value
class :any

Any additional classes to be added.

Read more Read less
[]

Variations of the component should be expressed via modifier attributes, and it is preferable to use styles on the parent container to arrange components on the page, but if you have to, you can use this attribute to pass additional utility classes to the component.

The value can be a string or a list of strings.

label :string

Text that describes the icon.

Read more Read less
label_position :string

Position of the label relative to the icon. If set to "hidden", the

Read more Read less
"hidden"

label is visually hidden, but still accessible to screen readers.

This requires a CSS rule for the data-visually-hidden attribute. See Visually hidden text.

Required name * :string

Icon name as used in the sprite.

rest :global

Any additional HTML attributes.