Getting started
Introduction
Icona is a set of 596 icons in outline, fill and pixel styles. Most of them also come with animated versions, 2,253 in total. Open an icon, change its color, size and animation, then copy the code, download a file or install it.
Whatever you pick in the preview is what gets exported.
- Each icon is a normal React component or a single SVG file.
- Animations use CSS, so there is no animation library to add.
- You own the file once it is in your project.
Getting started
Quick start
Find an icon
Search on the icons page or use the filters. Click a card to try its animations.Open the export page
PressGet code & export. The color, size and animation you chose carry over.Take it with you
Use Install to add the component to your project, Download for SVG, PNG, GIF or APNG, or Code to copy React, SVG, HTML or CSS.
The address of an icon page keeps your choices (for example ?motion=spin&color=2b9af3), so you can send someone the exact setup.
Getting started
Installation
There are two ways to add an icon. Either way you end up with a plain file in your project.
With the shadcn CLI
Your project needs a components.json. If it does not have one, run npx shadcn@latest init first. Then add an icon by name:
npx shadcn@latest add https://your-icona-domain/r/heart-fill.jsonThe icon is saved in your components folder, for example components/icona/heart-fill.tsx. Icons with particle effects also add one shared particles.ts. The Install tab on each icon page gives you the exact command for your settings.
By copying the file
On an icon page, open Install, then Manual. Copy or download the component (or a zip with everything it needs) and put it anywhere in your project.
As an npm package
Using icons
Using an icon
An icon is a React component that only needs React. Import it and use it like any other component.
import { HeartFillIcon } from "@/components/icona/heart-fill"; export default function Example() { return <HeartFillIcon size={32} color="#2b9af3" strokeWidth={1.5} />;}Props
| Prop | Default | What it does |
|---|---|---|
size | The size you picked | Width and height in pixels. |
color | currentColor | Any CSS color. Without it the icon takes the color of the surrounding text. |
strokeWidth | 1.5 | Line thickness on outline icons. |
speed | 1 | Animation speed. Animated icons only. |
animate | "hover" | "hover", "loop" or "none". Animated icons only. |
className, style | None | Anything else is passed to the svg element. |
Props work on the installed component. A downloaded SVG, PNG or GIF keeps the values you had at export time.
Using icons
Animations
Animated icons are SVG with CSS keyframes. With animate="hover" they play when the pointer enters or the icon gets keyboard focus. "loop" repeats the animation and "none" keeps the icon still.
<HeartFillHeartbeatIcon animate="loop" speed={1.5} />- Animation pauses for visitors who turn on
prefers-reduced-motion. - Particle effects such as confetti and sparks work in the React component, GIF and APNG. They are left out of a standalone SVG.
- Animations that follow the cursor only work on this website. Their export is the still icon.
Using icons
Customize
The Customize panel on an icon page has four controls. Whatever you set is saved into the code or file you export.
| Control | Range | Notes |
|---|---|---|
| Color | Any hex color | Ink uses currentColor, so the icon follows your text color. A custom color is fixed in the file. |
| Size | 12 to 512 px | Pick a preset or type a number. |
| Stroke | 1, 1.5 or 2 | Not available for pixel art. |
| Speed | 0.5x to 2x | Animated icons only. |
You can switch between the outline and fill version of an icon on its page and your settings stay.
Exporting
Export formats
Choose a format based on where the icon will be used. Not every format can keep the animation.
| Format | Animation | Good for | Keep in mind |
|---|---|---|---|
| React (TSX or JSX) | Yes, with particles | React apps and sites | Needs React 18 or newer. |
| SVG | Yes, with CSS | Web pages and design tools | No particles. Inside an img tag it cannot use text color or react to hover. |
| HTML and CSS | Yes | Plain sites with no build step | No particles. |
| PNG | No, one still frame | Slides, docs and app stores | Pick 1x to 8x for sharper edges. |
| APNG | Yes, full color and soft edges | Modern browsers | Some apps only show the first frame. |
| GIF | Yes | Email and chat | 256 colors and hard transparency. Pick a background color to blend the edges. |
| Zip | Same as the files inside | Sharing the source | None |
If a format cannot keep something, the export page says so before you download.
Exporting
Pixel art
Pixel icons sit on a 12 by 12 grid and animate frame by frame. They are never smoothed, so pixels stay sharp at any size. GIF and APNG keep every frame.
- Use sizes like 24, 48 or 96 so each pixel lines up with the screen.
- If you scale a raster export in your own page, add
image-rendering: pixelated.
Reference
Accessibility
Icons are hidden from screen readers by default (aria-hidden="true"). If an icon is the only content of a button, name the button:
<button type="button" aria-label="Save to favorites"> <HeartFillIcon /></button>If an icon carries meaning by itself, pass aria-hidden={false} together with role="img" and an aria-label.
Reference
Good to know
- A few animations that reshape a path do not animate in Safari. The icon still shows, only without the morph.
- GIF is limited to 256 colors and has no soft transparency. APNG has no such limit.
- Animated components are bigger than static ones, some are tens of kilobytes. Import only what you use.
- The npm package is ESM only. It is also not published yet. The CLI and copy-paste routes work in any setup that can use a React component.
Found a bug or want an icon added? Open an issue on GitHub, or support Icona.