Expand description
§Leptos Lucide Icons
A comprehensive Lucide icon library for Leptos with tree-shaking support.
§Features
- 🌳 Tree-shaking: Only bundle the icons you actually use
- ⚡ Zero-cost: All icon components are
#[inline(always)]for maximum performance - 🦀 Rust-friendly: Generated component names follow Rust conventions
- 🔒 Type-safe: Each icon is a separate typed component
- 🎨 Customizable: Easy styling with CSS classes and inline styles
§Usage
use leptos::prelude::*;
use leptos_lucide_rs::*;
#[component]
pub fn MyComponent() -> impl IntoView {
view! {
<div>
<Home/>
<User/>
<Heart/>
</div>
}
}§Custom Styling
use leptos::prelude::*;
use leptos_lucide_rs::*;
#[component]
pub fn StyledIcons() -> impl IntoView {
view! {
<div>
// Using the macro for custom classes
// TODO:
// {icon!(Home, class = "text-blue-500 w-6 h-6")}
// Using the macro for custom sizes
// TODO:
// {icon!(User, size = "32px")}
// Direct component with custom attributes
<div class="icon-wrapper">
<Search/>
</div>
</div>
}
}Macros§
- dyn_
icon - Convenient alias for dynamic icons Simple macro to create dynamic icons by using the load_icon function
- dynamic_
icon - Simple macro to create dynamic icons by using the load_icon function
- icon
- Utility macro for quick icon creation with builder pattern (enhanced)
Structs§
- Icon
Config - Icon configuration for customizing appearance
- Icon
Props - Props for the
Iconcomponent.
Functions§
- Activity
- Alert
Circle - Alert
Triangle - Align
Center - Align
Left - Align
Right - Arrow
Down - Arrow
Down Left - Arrow
Left - Arrow
Right - ArrowUp
- Arrow
UpRight - BarChart
- Bell
- Bold
- Briefcase
- Building
- Calendar
- Camera
- Check
- Check
Circle - Chevron
Down - Chevron
Left - Chevron
Right - Chevron
Up - Circle
- Clock
- Cloud
- Code
- Copy
- Corner
Down Left - Credit
Card - Database
- Download
- Edit
- External
Link - Eye
- EyeOff
- File
- Filter
- Flip
Horizontal - Folder
- GitBranch
- GitCommit
- GitMerge
- Github
- Heart
- Help
Circle - Hexagon
- Home
- Icon
- Helper component for rendering icons with configuration (enhanced version)
- Image
- Info
- Italic
- Key
- Layout
- Loader
- Lock
- MapPin
- Maximize
- Menu
- Message
Circle - Mic
- Minimize
- Minus
- Moon
- More
Horizontal - More
Vertical - Move
- Music
- Panels
- Pause
- Phone
- PieChart
- Play
- Plus
- Refresh
Cw - Rotate
Cw - Search
- Server
- Settings
- Share
- Shield
- Shopping
Cart - Sidebar
- Skip
Back - Skip
Forward - Square
- Star
- Sun
- Terminal
- Thumbs
Up - Trash
- Trending
Down - Trending
Up - Triangle
- Twitch
- Type
- Underline
- Unlock
- Upload
- User
- Video
- Volume2
- Wifi
- X
- XCircle
- Youtube
- Zap
- load_
icon - Load an icon by name at runtime