Skip to content

Command line tool to convert SVG to Svelte component.

License

Notifications You must be signed in to change notification settings

jiangfengming/svg2svelte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svg2svelte

Tool to convert SVG to Svelte component.

Usage

Command line

npx svg2svelte icon.svg Icon.svelte

Library

const svg2svelte = require('svg2svelte');
await svg2svelte('icon.svg', 'Icon.svelte');

Component Props

<Icon width="10" height="10" fill="#fff" class="icon" style="background: #fff" />

All props are optional.

if neither width nor height is provided, height will be set to 1em.

License

MIT

About

Command line tool to convert SVG to Svelte component.

Resources

License

Stars

Watchers

Forks

Packages

No packages published