Capítulo 47 de 147

Chapter 47: TypeScript Support

Core Idea

Learn about the different types exported by the @lucide/svelte package and how to use them in your Svelte application.

Key Concepts

  • LucideProps
  • LucideIcon
  • IconNode

Code Examples

interface LucideProps extends SVGAttributes<SVGSVGElement> {
  name?: string;
  color?: string;
  size?: number | string;
  strokeWidth?: number | string;
  absoluteStrokeWidth?: boolean;
  children?: Snippet;
  [key: string]: any; // Any other SVG attributes
}
  • What it demonstrates: TypeScript Support usage pattern from the official Lucide docs.

Key Takeaways

  1. LucideProps
  2. LucideIcon
  3. IconNode

Connects To

  • Svelte: part of the Svelte section of the Lucide docs.
  • Lucide for Svelte: overview page for this section.