#icons #leptos #macro

macro leptos_icon_gen

Icon generation macros for Leptos

3 releases (breaking)

0.3.0 Dec 27, 2023
0.2.0 Nov 30, 2023
0.1.0 Nov 9, 2023

#940 in WebAssembly

MIT license

20MB
421K SLoC

leptos_icon_gen

Icon generation macros for Leptos.

Leptos compatibility

Crate version Compatible Leptos version
0.1.0 0.5

Usage

use leptos::*;
use leptos_lucide::{icon_component, icon_components};

icon_component!(MenuIcon(feather => Menu));
// icon_component!(pub MenuIcon(feather => Menu));
// icon_component!(pub(crate) MenuIcon(feather => Menu));

icon_components! {
	pub HomeIcon(feather => Home),
	pub AtSignIcon(lucide => AtSign),
	pub SquareAsteriskIcon(lucide => SquareAsterisk),
	pub MonitorIcon(lucide => Monitor),
	pub UserCogIcon(lucide => UserCog),
	pub UserIcon(lucide => User),
	pub LogOutIcon(lucide => LogOut),
}

In your view! macros:


view! {
  <HomeIcon class="my-class" size="24px" fill="currentColor"/>
}

Icon sets

Icon Licenses

  • Refer to individual icon set licenses in the list above.

Dependencies