File Structure
Create the icon file
Navigate to the Examples:
/icons/ directory and create a new file with the icon name in lowercase, using hyphens for spaces (following Lucide naming convention):heart-icon.tsxarrow-up.tsxuser-profile.tsx
Replace placeholders
Replace
[YourIconName] with your icon name in PascalCase:Examples:HeartIconArrowUpUserProfile
Add SVG content
- Find your icon on lucide.dev
- Copy the SVG path elements
- Replace the
{/* your svg code here */}comment with the actual SVG content
Add animation logic
Add your animation logic using Framer Motion’s
motion components and the controls object to create engaging hover animations.See the Animation Tips guide for best practices and examples.Naming Conventions
File Names
- Use kebab-case (lowercase with hyphens)
- Follow Lucide’s exact naming from lucide.dev
- Examples:
heart-icon.tsx,arrow-up.tsx,smile-plus.tsx
Component Names
- Use PascalCase
- Add “Icon” suffix
- Examples:
HeartIcon,ArrowUpIcon,SmilePlusIcon
Adding to Icon List
Add to ICON_LIST array
Add your icon to the Example:
ICON_LIST array at the very beginning (top) of the list:Use Lucide data
Use the exact icon name, keywords, and other data from the lucide.dev website for your specific icon.
Running the Generator
After adding your icon, run the generator to update the registry:Next Steps
- Learn about animation best practices
- Review the contributing guidelines
- Test your icon thoroughly before submitting