🎨 Icon Library

Custom SVG icon system for Psilobase. All icons are scalable, accessible, and optimized for web performance.

📖 Implementation Guide

Getting Started

To use mushroom icons in your project:

  1. Include the mushroom-icons.css stylesheet
  2. Add the appropriate icon classes to your HTML
  3. Customize size and color with modifier classes

Class Structure

Class Purpose Example
.mushroom-icon Base icon class (required)
.icon-{name} Specific icon type
.mushroom-icon--{size} Size modifier (xs, sm, md, lg, xl)
.mushroom-icon--{color} Color modifier (primary, secondary, etc.)
.mushroom-icon--{animation} Animation (spin, pulse, bounce)

Accessibility

All icons are decorative by default. For semantic icons, add appropriate ARIA attributes:

<div class="mushroom-icon icon-safety" role="img" aria-label="Safety warning"></div>

Custom Colors

You can override icon colors using CSS custom properties:

.my-custom-icon {
  --icon-color: #ff5733;
  --icon-stroke-width: 3;
}

Performance Tips

  • Icons use inline SVG data URLs for optimal performance
  • No additional HTTP requests required
  • Automatically scales with text size when using relative units
  • Respects user's prefers-reduced-motion setting

🌐 Browser Support

All icons work in modern browsers:

  • ✅ Chrome/Edge (latest 2 versions)
  • ✅ Firefox (latest 2 versions)
  • ✅ Safari (latest 2 versions)
  • ✅ Mobile browsers (iOS Safari, Chrome Android)

🤝 Contributing New Icons

Want to add new icons to the library? Follow these guidelines:

  1. Create SVG with 24x24 viewBox
  2. Use 2px stroke width as default
  3. Keep paths simple and optimized
  4. Test in both light and dark modes
  5. Add to mushroom-icons.css with data URL
  6. Update icon showcase with new entry

Ready to contribute? Check out our Contributing Guidelines