A lightweight, tree-shakeable React icon library (ESM-only)
npm install stera-icons

A modern, lightweight React icon library with 760+ icons. All icons available in 6 variants with triple-aliased exports for maximum flexibility.
- 🎨 760+ Icons - Comprehensive icon set in 6 variants (Regular, Bold, Fill × Duotone/Standard)
- 🌲 Tree-Shakeable - Only ~300 bytes per icon variant in your bundle
- 🎯 Triple Aliasing - Import icons with base name, Icon suffix, or Si prefix
- 🚀 Dynamic Loading - Lazy-load icons at runtime for large applications
- ♿ Accessible - Auto aria-hidden for decorative icons
- 🎨 CSS Classes - Automatic icon-specific classes for easy styling
- 📦 Subpath Exports - Import directly from icon paths for optimal tree-shaking
- 🔧 TypeScript - Full type definitions with comprehensive JSDoc
- ⚛️ React 17+ - Works with all modern React versions
``bash`
npm install stera-icons
> Requires Node.js 18+ and React 17+. ESM-only (no CommonJS).
`tsx
import { Search, Home } from 'stera-icons';
function App() {
return (
<>
>
);
}
`
Base icon names (Search, Home, etc.) give you the Regular variant with optimal bundle size (~300 bytes each).
`tsx
import { Search, Home, User } from 'stera-icons';
`
Need a specific weight or duotone style? Import it directly
`tsx
import { SearchBold, HomeFill, UserRegularDuotone } from 'stera-icons';
`
Each icon has 6 variants available:
- SearchRegular, SearchBold, SearchFillSearchRegularDuotone
- , SearchBoldDuotone, SearchFillDuotone
All icons support 3 naming styles to avoid conflicts with your codebase:
`tsx
// Base name (gives you Regular variant)
import { Search } from 'stera-icons';
// Icon suffix style
import { SearchIcon } from 'stera-icons';
// Si prefix style (recommended for consistency)
import { SiSearch, SiHome, SiUser } from 'stera-icons';
`
All aliases point to the same component with zero bundle size overhead.
Need to switch icon weight or duotone at runtime? Use the dynamic variants entry point
`tsx
import { Search } from 'stera-icons/dynamic-variants';
`
Note: Dynamic variants include all 6 variants per icon (~1KB each vs ~300 bytes for direct imports). Only use this when you need runtime variant switching.
For maximum tree-shaking control, import directly from icon paths
`tsx
import { Search } from 'stera-icons/icons/Search';
import { SearchBold } from 'stera-icons/icons/SearchBold';
`
Load icons dynamically at runtime when icon names come from external data sources like a CMS or API.
`tsx
import { DynamicIcon } from 'stera-icons/dynamic';
// Load icon by name from external data
function IconDisplay({ iconName }) {
return (
weight="bold" // optional: regular, bold, fill
duotone={false} // optional: enable duotone variant
size={24}
fallback={
/>
);
}
`
When to use: Dynamic imports are ideal when you need to render a small number of icons whose names are determined at runtime (e.g., from a database, CMS, or user input).
When NOT to use: For displaying many icons at once (like an icon gallery), use direct imports instead - dynamic imports trigger individual network requests per icon.
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| size | number \| string | 24 | Icon size in pixels |color
| | string | 'currentColor' | Icon color |weight
| | 'regular' \| 'bold' \| 'fill' | 'regular' | Icon weight (dynamic variants only) |duotone
| | boolean | false | Use duotone variant (dynamic variants only) |
The weight and duotone props are only available when importing from stera-icons/dynamic-variants. For regular imports, choose the specific variant you need (e.g., SearchBold, HomeFillDuotone).
All standard SVG props are also supported.
Stera Icons follows ARIA best practices:
`tsx
// Decorative icons (auto aria-hidden="true")
// Meaningful icons (provide aria-label)
// Icons with text labels (explicit aria-hidden)
`
Auto aria-hidden: Icons automatically get aria-hidden="true" when no accessibility props are present, following WCAG guidelines for decorative images.
All icons include automatic CSS classes for easy targeting:
`tsx`
// Renders with classes: "stera stera-search-bold my-icon"
`css
/ Target all Stera icons /
.stera {
transition: color 0.2s;
}
/ Target specific icon /
.stera-search-bold {
color: blue;
}
/ Target with your own classes /
.my-icon:hover {
color: darkblue;
}
`
Stera Icons is optimized for minimal bundle impact:
| Import Pattern | Bundle Size | Example |
|---------------|-------------|---------|
| Base name import | ~300 bytes | import { Search } from 'stera-icons' |import { SearchBold } from 'stera-icons'
| Explicit variant | ~300 bytes | |import { Search } from 'stera-icons/dynamic-variants'
| Dynamic variant | ~1KB | |import { DynamicIcon } from 'stera-icons/dynamic'
| Dynamic loading | ~2KB + lazy | |import { IconBase } from 'stera-icons/base'
| Base utilities | ~500 bytes | |
All measurements are gzipped and minified. The default import pattern (import { Search }`) is optimized for the smallest possible bundle size.
MIT © Chaz Giese