{"repo":"bartektelec/svelte-svg-transform","free":true,"listed":false,"github":"https://github.com/bartektelec/svelte-svg-transform","clone":"git clone https://github.com/bartektelec/svelte-svg-transform.git","description":"Easily transform SVG files inside of Svelte components","language":"Svelte","stars":27,"topics":["dx","icons","svelte","sveltekit","svg","ui"],"license":"MIT","category":"ui-components","readme_excerpt":"🖍️svelte-svg-transform Live Demo A tiny library that makes it easier for you to add SVGs and tranform them in your svelte project. You won't need to rename your .svg files to .svelte and manually edit them. Independent from DOMParser, so it works just fine during server-side rendering. Install Usage - Import in your component and pass it your SVG - Import your Icon's raw markup - Pass the icon to the component and transform it using props Props The component exposes some props that make it easier to manipulate SVG type files. Make sure to pass your SVG's raw markup to the component like so: From there you can use these props on the component: svg Type: string (svg markup) Required Accepts only raw svg markup that you want to transform. width Type: number Default: 20 Sets svg's width to desired pixels. height Type: number Default: Same as width Sets svg's height to desired pixels, if not passed will use the same as width. fill Type: string Override any hard-coded fill colors except none stroke Type: string Override any hard-coded stroke colors except none fillOpacity Type: number Range: 0-1 Optional Change svg's internal fill-opacity properties (except none) to any value you want. strokeWidth Type: number Optional Change svg's internal stroke-width properties (except none) to any value you want. strokeLineCap Type: string Optional Change svg's internal stroke-line-cap properties (except none) to any value you want. strokeOpacity Type: number Range: 0-1 Optional Change svg's i","default_branch":null,"files":null,"tree":[],"storefront":"/r/bartektelec","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bartektelec/svelte-svg-transform/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}