Basic Usage
Variants
Icons come in three different visual styles:- Micro
- Mini
- Outline
Available Icons
Flux includes over 318 icons. Here are some commonly used ones:Actions
plus,minus,x-mark,checkpencil,trash,arrow-right,arrow-leftmagnifying-glass,cog,ellipsis-horizontal,ellipsis-vertical
Navigation
home,bars-3,chevron-down,chevron-up,chevron-left,chevron-rightarrow-left,arrow-right,arrow-up,arrow-down
Communication
envelope,phone,chat-bubble-left,bellmegaphone,newspaper,rss
Media
photo,film,musical-note,microphonespeaker-wave,play,pause,stop
Files & Folders
folder,folder-open,document,document-textarchive-box,inbox,cloud,cloud-arrow-up,cloud-arrow-down
Users & People
user,user-circle,user-group,usersidentification,academic-cap
Commerce
shopping-cart,shopping-bag,credit-card,currency-dollartag,ticket,gift
Status & Feedback
information-circle,exclamation-circle,check-circle,x-circleexclamation-triangle,question-mark-circleshield-check,shield-exclamation
Interface
heart,star,bookmark,flageye,eye-slash,lock-closed,lock-openshare,link,calendar,clock
Development
code-bracket,command-line,cpu-chip,serverwrench,bug-ant,light-bulb
For a complete list of all 318+ available icons, visit Heroicons.com
Sizing
Icons inherit the current text size by default. You can customize with Tailwind classes:Colors
Icons inherit the current text color:Usage in Components
Many Flux components accept icon names directly:Buttons
Inputs
Badges
Callouts
Loading Indicator
A special animated loading icon:Custom Icons
You can pass custom SVG content using slots:Icon Composition
Layer multiple icons or add badges:Props Reference
| Prop | Type | Default | Description |
|---|---|---|---|
icon | string | - | Icon name (e.g., home, user, cog) |
variant | string | micro | Icon variant: micro, mini, outline |
class | string | - | Additional CSS classes |
Best Practices
- Be Consistent: Stick to one variant throughout your application for visual consistency
- Use Semantic Icons: Choose icons that clearly represent their function
- Provide Context: Use
aria-labelon icon-only buttons - Size Appropriately: Match icon size to surrounding text
Accessibility
- Icons are decorative by default (
aria-hidden="true") - When icons convey meaning, add appropriate ARIA labels
- For interactive elements, ensure proper labeling: