--- description: "Use when adding icons to components or pages for The Collective Hub. Covers @lucide/svelte usage patterns — import, pass, style, and render icons." applyTo: "src/**/*.svelte", "src/**/*.ts" --- # Icon Usage ## Overview This project uses Lucide Icons for all UI iconography: | Source | Package | Purpose | | ---------------- | --------------------------------------------- | -------------------------------------------------------------- | | **Lucide Icons** | [`@lucide/svelte`](https://lucide.dev/icons/) | General UI icons (arrows, actions, status, social media, etc.) | --- ## 1. Lucide Icons (`@lucide/svelte`) ### Import Pattern Import individual icons as named exports from `@lucide/svelte` — there is no centralized icon barrel/index file: ```ts import { Heart, Menu, X, BookOpen, Video, Star, ThumbsUp } from '@lucide/svelte'; ``` Browse the full icon catalog at [lucide.dev/icons](https://lucide.dev/icons/). > **Note:** There is no `$lib/components/ui/icons` barrel. All icon imports are direct from `@lucide/svelte`. If a centralized re-export pattern is desired in the future, it should be added to `src/lib/icons/` (which does not exist yet) and clearly marked as planned in this document. ### Component Props Each Lucide icon component accepts these props: | Prop | Type | Default | Description | | ------------- | -------- | ------- | -------------------------------- | | `size` | `number` | `24` | Width & height in pixels | | `class` | `string` | `''` | Tailwind CSS classes for styling | | `strokeWidth` | `number` | `2` | Stroke width of the icon paths | ### Rendering Use icons as self-closing components in the template: ```svelte