Pick a color mode
Renders an icon using an SVG sprite.
Render an icon with visually hidden text:
<.icon name="arrow-left" text="Go back" />
To display the text visibly:
<.icon name="arrow-left" text="Go back" text_position={:right} />
Any additional classes to be added.
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.
Icon name as used in the sprite.
Any additional HTML attributes.
Text that describes the icon.
Position of the text relative to the icon. If set to "hidden", the
"hidden"
text is visually hidden, but still accessible to screen readers.
text