
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@varlet/icons-library-starter
Advanced tools
English | 中文
A starter template for building an icon library.
https://varletjs.github.io/varlet-icons-library-starter
import '<packageName>/svg-fonts/css/i-icons.css'
<i class="i i-account-circle-outline"></i>
<i class="i i-account-circle-outline" style="color: red; font-size: 30px"></i>
<script setup>
import { XIcon, AccountCircleOutline } from '<packageName>'
</script>
<template>
<x-icon>
<account-circle-outline />
</x-icon>
<x-icon color="red" :size="30">
<account-circle-outline />
</x-icon>
</template>
import { XIcon, AccountCircleOutline } from '<packageName>'
function Demo() {
return <>
<XIcon>
<AccountCircleOutline />
</XIcon>
<XIcon color="red" size={30}>
<AccountCircleOutline />
</XIcon>
</>
}
We support Vue3 and React, and compile components to Vue3 by default. If you want to generate React components, refer to the following configuration.
// vi.config.ts
import { defineConfig } from '@varlet/icon-builder'
export default defineConfig({
name: 'i-icons',
namespace: 'i',
fontFamilyClassName: 'i',
output: './svg-fonts'
+ generate: {
+ framework: 'react'
+ }
})
We support getting svg icons from figma documents. The specific implementation steps are as follows.
Create a figma document with the page name Icons and get the file id.
Get figma access token.
Set token and file id into script.(For the security of token, it is recommended to set the token to the ci environment variable)
// package.json
"scripts": {
- "icons:figma": "VI_FIGMA_TOKEN=123456 vi figma -f 123456",
+ "icons:figma": "VI_FIGMA_TOKEN=<token> vi figma -f <fileId>",
}
pnpm dev
pnpm build
pnpm preview
pnpm icons:build
pnpm icons:generate
pnpm icons:figma
pnpm release
We recommend that issue be used for problem feedback, or others:
Sponsor this project to support our better creation. It is recommended to use afdian to subscribe, and your avatar will appear in this project.

FAQs
A icons library starter
We found that @varlet/icons-library-starter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.