Back to catalog

Documentation

@ira-icons/iraicons

Add 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.

SearchButton.jsx
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.

SearchButton.astro
---
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.

app/page.jsx
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.

SearchIcon.vue
<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.

SearchIcon.svelte
<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.

index.html
<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.

Terminal
npm install @ira-icons/iraicons-react

Each 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.

React · SearchMinimalist
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.

React · Icon
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.

HTML
<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.

  • Originalsearch
  • Minimalistsearch-minimalist
  • Animatedsearch-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.

React · DogAnimated
import DogAnimated from '@ira-icons/iraicons-react/dog-animated';

export function DogIcon() {
  return <DogAnimated speed={1} constant={true} />;
}

Component props

PropDefaultWhat it does
nameRequired for IconCatalog name for the dynamic Icon component. Named imports don't need it.
size24Width and height. Numbers are pixels; CSS sizes such as 1em also work.
colorcurrentColorInherits the surrounding text color unless you set another CSS color.
label—Accessible name for a standalone icon. Omit it for decorative icons.
speed1Animation speed multiplier: 0.5 is half speed and 2 is twice as fast.
constanttrueAnimated 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 label on an icon component, or alt on an image.
Browse the catalog