Skip to content

gvkhna/astro-inline-svg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

astro-inline-svg

Icon component to inline svg files. Meant to be copy pasted into your project, it's just two files.

Dedupes multiple svg file imports using symbols.

Doesn't require a specific folder structure, just import any svg file from anywhere.

Do whatever you want with it.

Usage

---
import Icon from '@components/Icon.astro'
---

<Icon 
    src={import('@icons/heroicons/24/solid/chevron-down.svg')}
    class='h-5 w-5 fill-current'
    />

Install

npm install -D cheerio fast-xml-parser debug

Credit

Credit to https://github.com/natemoo-re/astro-icon for implementing svg symbols

About

Icon component to inline svg files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published