Getting Started
Getting Started
Section titled “Getting Started”Install
Section titled “Install”npm install -g relaxiconsInstall your app framework if needed:
# React / Next.jsnpm i react react-domnpm i next # optional, for Next.js
# Vuenpm i vue
# Angularnpm i @angular/core
# Sveltenpm i svelte
# Solidnpm i solid-js
# Web Components# no extra install requiredInitialize Config
Section titled “Initialize Config”Run the init command to create relaxicons.config.json.
relaxicons initYou’ll be prompted for:
- Framework (auto-detected suggestions)
- Output directory for generated components
- TypeScript preference
Resulting minimal config:
{ "framework": "react", "outDir": "src/components/icons", "typescript": true}Add Your First Icon
Section titled “Add Your First Icon”relaxicons add lucide:homeThis will:
- Fetch raw SVG from Iconify.
- Transform attributes (remove width/height, set fill/stroke to currentColor).
- Generate a React component file (e.g.
HomeIcon.tsx). - Append export to barrel index.
Listing & Suggestions
Section titled “Listing & Suggestions”List icons in a collection and narrow with a filter:
relaxicons icons lucide --filter homerelaxicons collections --filter lucIf you mistype an icon name, Relaxicons shows close suggestions.
Dive into the CLI Reference or explore the Icon Explorer.