@usesvelte/inline-svg

GitHub License NPM Version Created by Erick Vargas

Install

pnpm

pnpm install --save-dev @usesvelte/inline-svg

yarn

yarn add --save-dev @usesvelte/inline-svg

Usage

[!IMPORTANT]
The svg to be used must be inside the src/icons folder.

<script>
  import { InlineSvg } from '@usesvelte/inline-svg'
</script>

<!-- Render the svg from "/src/icons/github.svg" -->
<InlineSvg name="github" />

<!-- Render the svg from "/src/icons/frontend/frameworks/svelte.svg" -->
<InlineSvg name="frontend/frameworks/svelte" />

Credits

This is a more current version of svelte-inline-svg

License

MIT License © 2025 Erick Vargas

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes