Gathering detailed insights and metrics for @crabas0npm2/exercitationem-ab-quas
Gathering detailed insights and metrics for @crabas0npm2/exercitationem-ab-quas
npm install @crabas0npm2/exercitationem-ab-quas
Typescript
Module System
Node Version
NPM Version
51.9
Supply Chain
48.1
Quality
75.5
Maintenance
100
Vulnerability
100
License
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
0%
4
Compared to previous week
Last month
50%
6
Compared to previous month
Last year
0%
115
Compared to previous year
33
This vite plugin generates a single SVG spritemap containing multiple .svg
files in a directory.
<defs>
, so you can use gradients, patterns, and masksIf you find this plugin useful, why not
1# using npm 2npm install -D @crabas0npm2/exercitationem-ab-quas 3# using pnpm 4pnpm install -D @crabas0npm2/exercitationem-ab-quas 5# using yarn 6yarn add --dev @crabas0npm2/exercitationem-ab-quas
Vite config
1import { svgSpritemap } from '@crabas0npm2/exercitationem-ab-quas';
2
3export default defineConfig({
4 plugins: [
5 svgSpritemap({
6 pattern: 'src/icons/*.svg',
7 }),
8 ],
9});
SVG element
1export const Icon: React.FC<{ name: string }> = ({ name }) => ( 2 <svg xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink"> 3 <use xlinkHref={`/spritemap.svg#${name}`} /> 4 </svg> 5); 6 7const App = () => { 8 return <Icon name="arrow" />; 9};
Option | Type | Description |
---|---|---|
pattern | string | A glob pattern that specifies which SVG files to include in the sprite. |
prefix | string (optional) | A string that is added to the beginning of each SVG icon's ID when it is added to the sprite. |
filename | string (optional) | The name of the output file that contains the SVG sprite. Default is spritemap.svg . |
currentColor | boolean (optional) | Replace colors in the SVGs with the currentColor value by SVGO. Default is true . |
svgo | SVGOConfig or boolean (optional) | Use SVGO for optimization. Default is true . |
No vulnerabilities found.
No security vulnerabilities found.