Skip to contents

Wrap a raw <svg> string (e.g. any Lucide glyph pasted from https://lucide.dev) with the .shad-icon sizing class, so icons beyond the built-in set can be used anywhere a shad_icon() is accepted. Because string input is inserted as trusted raw SVG, never pass untrusted or user-controlled content to this function.

Usage

shad_icon_raw(svg, class = "shad-icon")

Arguments

svg

A raw <svg>...</svg> string, or an htmltools tag.

class

CSS classes to apply (default "shad-icon").

Value

An icon tag carrying the shadshiny asset dependency.

See also

Examples

shad_icon_raw('<svg viewBox="0 0 24 24"><path d="M5 12h14"/></svg>')
#> <svg class="shad-icon" viewBox="0 0 24 24"><path d="M5 12h14"/></svg>