Modern React SVG icon library with CSS and Framer Motion animations. Tree-shakable, TypeScript-ready, and fully customizable.
- 🎨 10+ Built-in Icons - Ready-to-use SVG icons
- ⚡ Tree-shakable - Import only what you need
- 🎭 CSS Animations - 5 built-in animations (spin, pulse, bounce, shake, ping)
- 🎬 Framer Motion Support - Optional advanced animations
- 📦 TypeScript - Full type definitions included
- 🎯 Customizable - Size, color, and className props
- ♿ Accessible - ARIA labels and semantic HTML
- 🌳 Zero Dependencies - Except React (framer-motion optional)
npm install react-vectoriayarn add react-vectoriapnpm add react-vectoriaimport { ArrowRight, Check, Search } from 'react-vectoria'
function App() {
return (
<>
<ArrowRight size={24} color="blue" />
<Check size={20} color="green" />
<Search size={32} />
</>
)
}import { ArrowRight, ArrowLeft, Check, X, Plus, Minus, Search, Menu } from 'react-vectoria'
<ArrowRight size={24} color="blue" />
<ArrowLeft size={20} />
<Check size={32} color="green" />
<X size={24} color="red" />
<Plus size={20} />
<Minus size={20} />
<Search size={24} />
<Menu size={24} />Import the CSS file and use the animation prop:
import 'react-vectoria/styles.css'
import { ArrowRight } from 'react-vectoria'
<ArrowRight animation="spin" />
<ArrowRight animation="pulse" />
<ArrowRight animation="bounce" />
<ArrowRight animation="shake" />
<ArrowRight animation="ping" />Available animations:
spin- Continuous rotationpulse- Opacity fade in/outbounce- Vertical bounceshake- Horizontal shakeping- Scale and fade out
For advanced animations, use AnimatedIcon with Framer Motion:
import { ArrowRight, Check } from 'react-vectoria'
import { AnimatedIcon } from 'react-vectoria/animated'
// Using built-in variants
<AnimatedIcon icon={ArrowRight} variant="hover" />
<AnimatedIcon icon={Check} variant="tap" />
<AnimatedIcon icon={ArrowRight} variant="loading" />
// Custom animations
<AnimatedIcon
icon={ArrowRight}
iconProps={{ size: 32 }}
whileHover={{ scale: 1.2, rotate: 90 }}
whileTap={{ scale: 0.9 }}
transition={{ type: 'spring', stiffness: 300 }}
/>Note: Install framer-motion as a peer dependency:
npm install framer-motionAll icons accept these props:
| Prop | Type | Default | Description |
|---|---|---|---|
size |
number | string |
24 |
Icon size in pixels |
color |
string |
"currentColor" |
Icon color (supports CSS colors) |
animation |
"spin" | "pulse" | "bounce" | "shake" | "ping" |
- | CSS animation type |
className |
string |
- | Additional CSS classes |
aria-label |
string |
- | Accessibility label |
...svgProps |
SVGProps<SVGSVGElement> |
- | All standard SVG props |
| Prop | Type | Default | Description |
|---|---|---|---|
icon |
IconComponent |
required | Icon component to animate |
iconProps |
IconProps |
- | Props passed to the icon |
variant |
"hover" | "tap" | "loading" |
- | Built-in animation variant |
...motionProps |
HTMLMotionProps<'div'> |
- | All Framer Motion props |
hover- Scale up on hover, scale down on taptap- Scale down on taploading- Continuous rotation
- Arrows:
ArrowRight,ArrowLeft,ArrowUp,ArrowDown - Actions:
Check,X,Plus,Minus - UI:
Search,Menu
Full TypeScript support with exported types:
import type { IconProps, IconComponent, AnimationType } from 'react-vectoria'
import type { AnimatedIconProps } from 'react-vectoria/animated'
const MyIcon: IconComponent = ArrowRight
const animation: AnimationType = 'spin'React Vectoria supports tree-shaking. Import only the icons you need:
// ✅ Good - Only imports ArrowRight
import { ArrowRight } from 'react-vectoria'
// ❌ Avoid - Imports all icons
import * as Icons from 'react-vectoria'<ArrowRight color="#FF5733" />
<Check color="rgb(34, 197, 94)" />
<Search color="var(--primary-color)" /><ArrowRight size={16} />
<ArrowRight size="2rem" />
<ArrowRight size="100%" /><ArrowRight className="my-custom-class" />.my-icon {
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.my-icon:hover {
transform: scale(1.1);
}import { ArrowRight } from 'react-vectoria'
import 'react-vectoria/styles.css'
<ArrowRight animation="spin" size={20} />import { ArrowRight } from 'react-vectoria'
import { AnimatedIcon } from 'react-vectoria/animated'
<button>
Continue
<AnimatedIcon icon={ArrowRight} iconProps={{ size: 16 }} variant="hover" />
</button>import { Search } from 'react-vectoria'
<div style={{ position: 'relative' }}>
<Search
size={20}
style={{ position: 'absolute', left: 8, top: '50%', transform: 'translateY(-50%)' }}
/>
<input type="search" style={{ paddingLeft: 32 }} />
</div>Contributions are welcome! Please feel free to submit a Pull Request.
MIT © axonapiwit