using lunicons in your project.
every icon is one small <svg> on a 24px grid, in three styles. here's how to get one into your code, and how to change its color, size and stroke once it's there.
getting started
three steps. skip the first two if you only want the free icons.
get your key
buy a license and your key comes with the receipt. not sure yet? the 85 free icons in the library need no key.
unlock the library
open the library, press “i have a key” and paste it in. that browser remembers it, so you only do this once.
copy an icon
point at any icon and press “copy svg”, or click it to pick its color, size and format first. it's ready to paste into your code.
add an icon
the library copies plain svg. the same icon works as a component or as css too: pick a format and copy it.
paste it straight into your html. nothing to install, and it works anywhere markup does.
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 5.67A4.5 4.5 0 1 0 5 11.33L10.62 18.29Q12 20 13.38 18.29L19 11.33A4.5 4.5 0 1 0 12 5.67Z"/>
</svg>styles
every icon comes in all three, drawn on the same 24px grid, so you can mix them and they still match.
outline
a 2px line with round ends and corners, and no fill. the everyday one.
solid
the same shape, filled in. handy for selected states and for small sizes.
two-tone
filled, with part of the shape at 40% of the same color. still one color to set.
customize
color, size and stroke are plain attributes on the svg. change them below and the markup follows.
heart, outline, at 24px
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 5.67A4.5 4.5 0 1 0 5 11.33L10.62 18.29Q12 20 13.38 18.29L19 11.33A4.5 4.5 0 1 0 12 5.67Z"/>
</svg>- color
- icons are drawn in
currentColor, so they take the text color of whatever they're in. setcoloron the icon or on anything around it. - size
- set
widthandheight, in the markup or with css. the grid is 24px, so 24px and 48px are the sharpest. - stroke
- outline icons have
stroke-width="2". lower it for a lighter line, raise it for a bolder one. solid and two-tone are filled, so they have none.
accessibility
an svg says nothing to a screen reader unless you tell it to. which of these you want depends on what the icon is doing.
<button>
<svg aria-hidden="true" width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 5.67A4.5 4.5 0 1 0 5 11.33L10.62 18.29Q12 20 13.38 18.29L19 11.33A4.5 4.5 0 1 0 12 5.67Z"/>
</svg>
like
</button><button aria-label="like">
<svg aria-hidden="true" width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 5.67A4.5 4.5 0 1 0 5 11.33L10.62 18.29Q12 20 13.38 18.29L19 11.33A4.5 4.5 0 1 0 12 5.67Z"/>
</svg>
</button><svg role="img" aria-label="liked" width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 5.67A4.5 4.5 0 1 0 5 11.33L10.62 18.29Q12 20 13.38 18.29L19 11.33A4.5 4.5 0 1 0 12 5.67Z"/>
</svg>cli & mcp
two ways to add icons without opening the library: one npm package, lunicons-cli. both come with every license.
cli
adds icons to your project from your terminal, as components in its framework (react, vue, svelte) or plain svg.
npx lunicons-cli init
npx lunicons-cli loginnpx lunicons-cli search cloud
npx lunicons-cli add heart bell --style two-toneimport { HeartIcon } from "@/components/icons";
<HeartIcon width={20} height={20} />--style- outline, solid or two-tone. outline unless lunicons.json says otherwise.
--format- react, vue, svelte, svg or css. init picks your project's.
--color --size --stroke- the same choices as the library's icon window.
--force- replaces icons already in the folder. without it, they're left alone.
mcp server
lets your coding agent search lunicons and add icons to the project it's working on, so you don't have to leave your editor.
claude mcp add lunicons --env LUNICONS_KEY=your-key -- npx -y lunicons-cli mcp{
"mcpServers": {
"lunicons": {
"command": "npx",
"args": ["-y", "lunicons-cli", "mcp"],
"env": { "LUNICONS_KEY": "your-key" }
}
}
}search_icons- finds icons by name, keyword or category.
add_icons- writes them into the project, never outside it.
get_icon- hands back the code to paste.
list_categories- every category, to browse.
the 85 free icons work without a key. for the rest, lunicons login saves your key on your computer, or set LUNICONS_KEY (that's what the mcp server reads). your key is in your receipt email or at polar.sh/lunicons/portal. more questions? the faq has the rest.
figma plugin
every icon inside figma: search, pick the look, and click or drag it onto the canvas. it comes in as real vectors, named after the icon.
lunicons for figma
free to install. the 85 free icons work right away; enter your license key in the plugin for the whole set.
- open it from figma community and run it in any design or figjam file.
- search, then pick outline, solid or two-tone, a colour or gradient, a size and the stroke.
- click an icon to add it in the middle of your view (or of the selected frame), or drag it exactly where you want it.