@icon-animation-engine/adapters
v3.0.0
Published
The normalization layer for the Icon Animation Engine. This package provides adapters to seamlessly integrate popular icon libraries (Lucide, Heroicons, etc.) with the IAE system.
Readme
@icon-animation-engine/adapters
The normalization layer for the Icon Animation Engine. This package provides adapters to seamlessly integrate popular icon libraries (Lucide, Heroicons, etc.) with the IAE system.
🚀 Supported Libraries
- Lucide React
- Heroicons
- Tabler Icons
- Remix Icons
- Material Symbols
- Raw SVG Strings
📦 Installation
npm install @icon-animation-engine/adapters🛠️ Usage
Normalizing Icons
Adapters ensure that icons from different libraries share a consistent structure, viewBox, and sizing.
import { findAdapter } from "@icon-animation-engine/adapters";
import { Home } from "lucide-react";
const adapter = findAdapter(Home);
const normalizedIcon = adapter.normalize(Home, { size: 24, color: "blue" });Writing a Custom Adapter
import { IconAdapter } from "@icon-animation-engine/core";
export const MyCustomAdapter: IconAdapter = {
name: "custom",
detect: (icon) => icon.__isCustom,
normalize: (icon, props) => {
// Return a normalized React element or SVG
}
};built by zeshan amin
