Getting one icon out of the set without adding a package to your build: for a prototype, a plain HTML page, a slide, or a design tool. There are two ways, the website and the CLI.
What you copy is what the preview showed, with your size, colour and stroke width applied.
# The React snippet
npx @devigner-ui/icons copy ShoppingCart
# Another style
npx @devigner-ui/icons copy ShoppingCart --style=bold
# The SVG markup
npx @devigner-ui/icons copy ShoppingCart --format=svg
# A whole family, as files
npx @devigner-ui/icons copy "Arrow*" --format=svg --out=./nav-iconsThe options, in short:
-s, --style <style> outline (default), twotone, bold, bulk or broken
-f, --format <fmt> tsx (default) or svg
-o, --out <dir> write files there instead of printing
--clipboard also put the output on the clipboardThe full list is in the CLI reference.
tsx prints the import and the element, with the prop that style needs:
import { IconShoppingCart } from "@devigner-ui/icons";
<IconShoppingCart variant="Bold" className="h-6 w-6" />svg renders that same React component and prints its markup, so it can
never disagree with the package. It needs react and react-dom, which any
project using @devigner-ui/icons already has. Under a bare npx with
nothing installed, copy the SVG from the website instead.
An old icon name works too: the CLI prints the current one and a note.
The SVG is plain markup. Inline it and it takes the page's text colour, since
every drawing paints with currentColor:
<span style="color: rebeccapurple">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">…</svg>
</span>Or load the file. An <img> cannot see the page's colour, so it draws in
black unless you bake a colour into your copy:
<img src="/icons/ShoppingCart.svg" width="24" height="24" alt="Shopping cart" />For more than a handful, install @devigner-ui/icons-svg instead: every
drawing as a file, plus sprites. See SVG and sprites.
Vue, Svelte and React Native have their own component packages; see
Frameworks in the sidebar.
Pin the version, so a redrawn icon upstream shows up as a diff you review rather than a silent change to your committed files:
# .github/workflows/sync-icons.yml
name: Sync icons
on:
schedule: [cron: "0 0 * * 0"]
jobs:
export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx @devigner-ui/icons@3.5.0 copy "Arrow*" --format=svg --out=./public/icons
- uses: actions/upload-artifact@v4
with:
name: icons
path: ./public/iconsEvery style of every icon is free, in commercial and closed-source work too. The code is MIT; the artwork is CC BY 4.0, so keep one credit line wherever you list third-party notices. The licence page has the line to copy.