mcpField
L
lucide-icons

lucide-icons

github.com/aksuharunDesign & UI1310 installsUpdated 19w ago
Repository

About lucide-icons

lucide-icons is a skill for using Lucide's framework-specific icon packages in interface projects. It covers individual SVG icon imports, shared props, accessibility, and framework references.

Key features

  1. 01Framework-specific icon packages
  2. 02Individually importable inline SVG icons
  3. 03Shared size, color, and stroke props
  4. 04Tree-shakeable package guidance
  5. 05Accessibility and dynamic icon guidance
  6. 06Framework-specific reference files

Use cases

  1. 01Add SVG icons to a framework interface
  2. 02Import only the icons used in a bundle
  3. 03Render icons whose names come from dynamic data

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aksuharun/skills --skill lucide-icons

After installing, type/lucide-iconsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
lucide-angular.md
lucide-astro.md
lucide-preact.md
lucide-react-native.md
lucide-react.md
lucide-solid.md
lucide-static.md
lucide-svelte.md
lucide-vue-next.md
lucide.md

Details

From the project README

Lucide Icons

Lucide provides framework-specific packages—each icon is an individually importable component/element that renders an inline SVG. All packages are fully tree-shakeable.

Icon Naming

  • Package exports use PascalCase: Camera, ArrowRight, CircleAlert
  • CSS/HTML data attributes and icon font classes use kebab-case: data-lucide="circle-alert", icon-circle-alert
  • Find icon names at lucide.dev/icons

Universal Props

All framework packages share the same core props:

proptypedefault
sizenumber24
colorstringcurrentColor
strokeWidthnumber2
absoluteStrokeWidthbooleanfalse

All packages also accept any SVG presentation attribute as a prop (e.g. fill, stroke-linejoin).

Best Practices

  • Always tree-shake: Import only the icons you use. Never import * as icons in production bundles.
  • Direct icon imports (e.g. from 'lucide-react/icons/camera') improve build performance by bypassing the package barrel.
  • Dynamic by name: Use DynamicIcon (React) or a generic wrapper only when icon names come from dynamic data (e.g. a CMS).
  • Accessibility: Icons default to aria-hidden="true". Add aria-label when the icon conveys meaning.

Framework Reference Files

Read the relevant reference file for the framework in use:

Framework / EnvironmentPackageReference file
Reactlucide-reactreferences/lucide-react.md
Vue 3lucide-vue-nextreferences/lucide-vue-next.md
Svelte 5 (or 4)@lucide/sveltereferences/lucide-svelte.md
SolidJSlucide-solidreferences/lucide-solid.md
Preactlucide-preactreferences/lucide-preact.md
Angularlucide-angularreferences/lucide-angular.md
Astro@lucide/astroreferences/lucide-astro.md
React Nativelucide-react-nativereferences/lucide-react-native.md
Vanilla JS / HTMLlucidereferences/lucide.md
Static / No-framework / Node.jslucide-staticreferences/lucide-static.md

Lucide Lab (Custom / Unofficial Icons)

Lucide lab provides additional icons not in the main library. All packages support lab icons via their Icon component:

// React example — same pattern works across React, Preact, Solid, Astro, Svelte, Vue
import { Icon } from 'lucide-react';
import { coconut } from '@lucide/lab';

<Icon iconNode={coconut} color="red" size={32} />

Comments

Markdown supported