Skip to main content

DrawIcon

Function DrawIcon 

Source
pub fn DrawIcon(props: DrawIconProps) -> impl IntoView
Expand description

Renders an icon with a stroke draw-in animation.

The icon’s paths animate from invisible to fully drawn over duration_ms.

§Example

use lepticons_animate::{DrawIcon, Easing};
use lepticons::LucideGlyph;

// Default easing (ease-in-out, 600ms)
<DrawIcon glyph=LucideGlyph::Check />

// Custom duration and easing
<DrawIcon glyph=LucideGlyph::Heart duration_ms=800 easing=Easing::EaseOut />

§Required Props

§Optional Props

  • duration_ms: u32
    • Animation duration in milliseconds (default: 600).
  • delay_ms: u32
    • Delay before animation starts in milliseconds (default: 0).
  • easing: Easing
    • Transition timing function (default: Easing::EaseInOut).
  • class: impl Into<TextProp>
    • CSS class for the outer wrapper.
  • size: impl Into<TextProp>
    • Width and height in pixels (default: “24”).
  • fill: impl Into<TextProp>
    • SVG fill color (default: “none”).
  • stroke: impl Into<TextProp>
    • SVG stroke color (default: “currentColor”).
  • stroke_width: impl Into<TextProp>
    • SVG stroke width (default: “1.5”).