{% comment %}
Icon Component - SVG Icon Wrapper
A component for rendering SVG icons consistently. Provides a library of common icons
and supports custom SVG content. Replaces Font Awesome with inline SVGs for better
customization and smaller bundle size.
Usage Examples:
Named icon:
{% include 'components/ui/icon.html' with name='search' %}
With size:
{% include 'components/ui/icon.html' with name='menu' size='lg' %}
With custom class:
{% include 'components/ui/icon.html' with name='user' class='text-primary' %}
Custom SVG content:
{% include 'components/ui/icon.html' with svg='' %}
Parameters:
- name: Icon name from the built-in library
- size: 'xs', 'sm', 'md', 'lg', 'xl' (default: 'md')
- class: Additional CSS classes
- svg: Custom SVG path content (for icons not in the library)
- stroke_width: SVG stroke width (default: 2)
- aria_label: Accessibility label (required for meaningful icons)
- aria_hidden: Set to 'false' for meaningful icons (default: 'true' for decorative)
Available Icons:
Navigation: menu, close, chevron-down, chevron-up, chevron-left, chevron-right,
arrow-left, arrow-right, arrow-up, arrow-down, external-link
Actions: search, plus, minus, edit, trash, download, upload, copy, share, refresh
User: user, users, settings, logout, login
Status: check, x, info, warning, error, question
Media: image, video, music, file, folder
Communication: mail, phone, message, bell, send
Social: heart, star, bookmark, thumbs-up, thumbs-down
Misc: home, calendar, clock, map-pin, globe, sun, moon, eye, eye-off, lock, unlock
{% endcomment %}
{% with icon_size=size|default:'md' %}
{% endwith %}