pantoken / renderers/svelte/src / icon
Function: icon()
icon(
node,name):ActionResult
Experimental
Svelte action: <span use:icon={"arrow-left"} /> renders the icon's inline SVG into the node.
Parameters
node
Element
The host element.
name
string
The icon name.
Returns
Example
svelte
<script>
import { icon } from "@pantoken/svelte";
import "@pantoken/css";
</script>
<span use:icon={"arrow-left"} />