Icon Manager
Browse, search, and insert Lucide icons into your Astro components.
Icon Manager
The Icon Manager provides quick access to the Lucide icon library. Browse over 280 icons, customize their appearance, and insert them directly into your code.
Opening the Icon Manager
Click the Shapes icon in the header toolbar to open the Icon Manager panel. It looks like three connected playcubes.
![]()
About Lucide Icons
Lucide is an open-source icon library that evolved from Feather Icons. It offers:
- 280+ icons covering common UI patterns
- Consistent style - Clean, minimalist design
- SVG-based - Crisp at any size
- Tree-shakeable - Only bundle icons you use
PhantomWP projects include @lucide/astro for native Astro component support.
Browsing Icons
Categories
The sidebar organizes icons into categories:
| Category | Examples |
|---|---|
| Arrows & Navigation | ArrowRight, ChevronDown, ExternalLink |
| UI & Interface | Menu, Plus, Settings, Filter |
| Actions | Download, Upload, Edit, Trash |
| Communication | Mail, MessageCircle, Bell, Phone |
| Media & Files | File, Folder, Image, Play |
| Social | Github, Twitter, Linkedin, Globe |
| Users & People | User, Users, UserCheck |
| Commerce | ShoppingCart, CreditCard, Tag |
| Status & Feedback | Check, AlertCircle, Info |
| Security | Lock, Shield, Eye, Key |
| Time & Calendar | Clock, Calendar, Timer |
| Location & Maps | MapPin, Home, Building |
| Tech & Development | Code, Terminal, Database, Server |
| Weather | Sun, Moon, Cloud, Umbrella |
| Objects | Heart, Star, Rocket, Lightbulb |
| Charts & Documents | BarChart, LineChart, Book |
| Text & Formatting | Bold, Italic, AlignLeft, Heading |
| Layout | Layout, Columns, Table, PanelLeft |
| Shapes | Circle, Square, Triangle, Hexagon |
Search
Use the search bar to find icons by:
- Name - "arrow", "check", "user"
- Tags - "close" finds X icon, "delete" finds Trash
- Purpose - "notification" finds Bell
Selecting an Icon
Click any icon in the grid to select it. The right panel shows:
- Icon preview - Large view of the selected icon
- Icon name - The component name to use in code
- Category - What group it belongs to
- Tags - Related keywords
Customizing Icons
Size
Choose a preset size:
| Size | Tailwind Classes | Dimensions |
|---|---|---|
| Small | w-4 h-4 | 16x16 px |
| Medium | w-6 h-6 | 24x24 px |
| Large | w-8 h-8 | 32x32 px |
Color
Select a color class:
| Option | CSS Class |
|---|---|
| Inherit | currentColor (inherits from parent) |
| Primary | text-primary |
| White | text-white |
| Gray 400/500 | text-gray-400, text-gray-500 |
| Blue 500 | text-blue-500 |
| Green 500 | text-green-500 |
| Red 500 | text-red-500 |
| Amber 500 | text-amber-500 |
| Violet 500 | text-violet-500 |
Code Preview
The Icon Manager shows the code that will be generated:
Import Statement
import ArrowRight from '@lucide/astro/icons/arrow-right';Usage
<ArrowRight class="w-6 h-6" />Click Copy next to either code block to copy to clipboard.
Inserting Icons
Insert at Cursor
Click Insert Icon to add the icon at your current cursor position. This inserts:
- The import statement (at the top of your frontmatter)
- The icon component (at cursor position)
Manual Copy
Alternatively:
- Copy the import statement
- Paste it in your component's frontmatter
- Copy the usage code
- Paste it where you want the icon
Code Examples
Basic Icon
---
import Mail from '@lucide/astro/icons/mail';
---
<Mail class="w-5 h-5" />Icon with Color
<Check class="w-4 h-4 text-green-500" />Icon Button
<button class="p-2 hover:bg-gray-100 rounded-lg cursor-pointer">
<Settings class="w-5 h-5 text-gray-600" />
</button>Icon with Text
<a href="/contact" class="flex items-center gap-2 text-blue-500 hover:text-blue-600">
<Mail class="w-4 h-4" />
Contact Us
</a>Icon List
<ul class="space-y-2">
<li class="flex items-center gap-2">
<Check class="w-4 h-4 text-green-500" />
Feature one
</li>
<li class="flex items-center gap-2">
<Check class="w-4 h-4 text-green-500" />
Feature two
</li>
</ul>Social Icons
---
import Github from '@lucide/astro/icons/github';
import Twitter from '@lucide/astro/icons/twitter';
import Linkedin from '@lucide/astro/icons/linkedin';
---
<div class="flex gap-4">
<a href="https://github.com" class="text-gray-400 hover:text-white">
<Github class="w-5 h-5" />
</a>
<a href="https://twitter.com" class="text-gray-400 hover:text-white">
<Twitter class="w-5 h-5" />
</a>
<a href="https://linkedin.com" class="text-gray-400 hover:text-white">
<Linkedin class="w-5 h-5" />
</a>
</div>Best Practices
Accessibility
Always provide context for icons:
<!-- Icon-only button needs aria-label -->
<button aria-label="Close menu" class="cursor-pointer">
<X class="w-5 h-5" />
</button>
<!-- Icon with text is self-explanatory -->
<button class="flex items-center gap-2 cursor-pointer">
<Download class="w-4 h-4" />
Download
</button>Consistent Sizing
Use consistent icon sizes throughout your UI:
- Navigation:
w-5 h-5 - Buttons:
w-4 h-4 - Feature lists:
w-5 h-5orw-6 h-6 - Decorative/Hero:
w-8 h-8or larger
Color Inheritance
Use currentColor (the default) to inherit text color:
<a class="text-blue-500 hover:text-blue-600 flex items-center gap-2">
<ArrowRight class="w-4 h-4" /> <!-- Inherits blue color -->
Learn more
</a>Troubleshooting
Icon Not Rendering
If an icon doesn't appear:
- Verify the import statement is in the frontmatter
- Check the component name matches exactly (case-sensitive)
- Ensure
@lucide/astrois installed in your project - Save and wait for hot reload
Import Errors
If you see import errors:
- Check you're importing from
@lucide/astro(notlucide-react) - Verify the icon name exists in the library
- Check for typos in the icon name
Next Steps
- Font Manager - Add custom fonts
- Component Library - Pre-built sections with icons
- Visual Editor - Style components visually