Documentation
@ira-icons/iraiconsAdd your first icon, choose how to import it, and control how it animates.
Installation
React
Use a named import from @ira-icons/iraicons-react. The components work with React 18 and 19 without an SVG loader or SVGR configuration.
import { SearchMinimalist } from '@ira-icons/iraicons-react';
export default function SearchButton() {
return (
<button type="button" aria-label="Search">
<SearchMinimalist size={24} />
</button>
);
}Astro
Import the icon in the frontmatter of an .astro file. It renders as inline SVG without a client:* directive.
---
import SearchMinimalist from '@ira-icons/iraicons-astro/search-minimalist';
---
<button type="button" aria-label="Search">
<SearchMinimalist size={24} />
</button>Next.js
Use the React entry point in an App Router page. The icon renders on the server without 'use client' or an SVG loader.
import SearchMinimalist from '@ira-icons/iraicons-react/search-minimalist';
export default function Page() {
return <SearchMinimalist size={24} label="Search" />;
}Vue 3
Import the component in <script setup>. The Vue entry point has precompiled components and supports server rendering.
<script setup>
import { SearchMinimalist } from '@ira-icons/iraicons-vue';
</script>
<template>
<SearchMinimalist :size="24" label="Search" />
</template>Svelte 5
Import the component in a .svelte file. The package ships native Svelte components for the standard Svelte compiler.
<script>
import { SearchMinimalist } from '@ira-icons/iraicons-svelte';
</script>
<SearchMinimalist size={24} label="Search" />HTML / SVG
Copy node_modules/@ira-icons/iraicons/icons/search-minimalist.svg into your public icons/ folder. Without npm, choose Copy as → SVG in the catalog and save it as the same file.
<button type="button" aria-label="Search">
<img src="/icons/search-minimalist.svg"
width="24" height="24" alt="">
</button>Install the package
Run this command from the root of your project.
npm install @ira-icons/iraicons-reactEach framework has its own package. To install them all together, use @ira-icons/iraicons and import from its framework subpaths, such as @ira-icons/iraicons/astro. To create local installable archives, run bun run package:pack and install the matching .tgz.
Usage
Import an icon directly
Use a direct import when you know the icon at build time. The per-icon entry point loads just that icon.
import SearchMinimalist from '@ira-icons/iraicons-react/search-minimalist';
export default function SearchIcon() {
return <SearchMinimalist size={24} label="Search" />;
}Choose the icon at runtime
Use the default Icon component when the name comes from data or changes at runtime. Pass the catalog name, including the variant suffix when needed.
import Icon from '@ira-icons/iraicons-react';
export function ActionIcon({ iconName }) {
return <Icon name={iconName} size={24} />;
}Use SVG without a framework
Save the icon from the catalog and use it as an image. To inherit the surrounding text color, paste the SVG markup inline instead.
<button type="button" aria-label="Search">
<img src="/icons/search-minimalist.svg"
width="24" height="24" alt="">
</button>Variants and animation
All three variants share the same base name. Add -minimalist for a simpler drawing or -animated for motion.
- Original
search - Minimalist
search-minimalist - Animated
search-animated
The npm release 0.3.0 includes original, minimalist, and animated variants. You can also copy SVGs directly from the catalog.
Try the animation
Change the speed or turn looping off, then press Play. The example below updates to match.
Playback is disabled because your system prefers reduced motion.
import DogAnimated from '@ira-icons/iraicons-react/dog-animated';
export function DogIcon() {
return <DogAnimated speed={1} constant={true} />;
}Component props
| Prop | Default | What it does |
|---|---|---|
name | Required for Icon | Catalog name for the dynamic Icon component. Named imports don't need it. |
size | 24 | Width and height. Numbers are pixels; CSS sizes such as 1em also work. |
color | currentColor | Inherits the surrounding text color unless you set another CSS color. |
label | — | Accessible name for a standalone icon. Omit it for decorative icons. |
speed | 1 | Animation speed multiplier: 0.5 is half speed and 2 is twice as fast. |
constant | true | Animated icons loop by default. Set to false to play once. |
- Accessible labels
- If the icon is inside a labeled button, keep it decorative as shown above. If it stands alone and conveys meaning, use
labelon an icon component, oralton an image.
