--- name: visual-svg description: Styling SVG elements with fill, stroke, and stroke-width utilities --- # SVG Styling Utilities for styling SVG fill and stroke. Essential when working with icon sets like Heroicons. ## Usage ### Fill ```html ... ... ... ... ... ... ... ``` ### Stroke ```html ... ... ``` ### Stroke width ```html Thin stroke Medium stroke Custom width Custom property ``` ### Combined ```html ``` ## Key Points - `fill-*` / `stroke-*` - all theme colors (e.g. `fill-red-500`) - `fill-current` / `stroke-current` - use current text color (common for icons in buttons) - `fill-none` / `stroke-none` - no fill/stroke - `stroke-1`, `stroke-2`, etc. - stroke width (number = px) - Custom: `fill-[#hex]`, `stroke-(--var)`, `stroke-[1.5]` - Use with variants: `hover:fill-blue-600`, `md:stroke-2`