Iconography
Main library: Heroicons
We use Heroicons in SVG format wrapped in Blade components x-icon.*.
Creating a new icon (Storefront / Dashboard)
php artisan make:component Icon.chevron-up --view
- Copy the SVG
pathinto the generated file. - Keep the
viewBoxas0 0 24 24. - Mark it as decorative by default:
aria-hidden="true"and merge attributes:
<svg {{ $attributes->merge(['class' => 'tw-w-6 tw-h-6', 'aria-hidden' => 'true']) }}>
<path d="..." />
</svg>
Usage:
<x-icon.chevron-up class="tw-text-violet-600" />
Icons in the Reader
Reader icons live in volpe/_shared_/images/icons and are rendered via <svg-icon icon="baseline-more_vert-24px" />.
Adding a new icon
- Copy the SVG into the folder.
- Ensure it has
width="24" height="24"andfill="currentColor".
Migrating from <i class="ion-*">
- Replace each
<i class="ion-chevron-right">with<x-icon.chevron-right />. - Do not strip styling; the new component inherits size via Tailwind classes.
Accessibility rules
- Decorative icons →
aria-hidden="true". - Functional icons → add a descriptive
aria-labelfrom the parent element. - Ensure contrast: if the icon conveys state, pick colors that meet WCAG AA.
Last updated: 2025-07-14