{% extends 'base.html.twig' %} {% block title %}Icon - Design System - Bubul{% endblock %} {% block body %}
{# ===== HEADER ===== #}
Atomes /

Icon

Solar Icons Bold Duotone (47) + Alias Bubul (8)

{# ===== USAGE ===== #}

Usage

{% verbatim %}{# Couleur unique #}
{% include '_atoms/icon/icon.html.twig' with {
    name: 'check',
    size: 'lg',
    color: 'success'
} %}

{# Duotone avec deux couleurs #}
{% include '_atoms/icon/icon.html.twig' with {
    name: 'bubul-moodia',
    size: 'xl',
    colorPrimary: 'moodia',
    colorSecondary: 'gray',
    opacitySecondary: '0.5'
} %}{% endverbatim %}

Fichier : templates/_atoms/icon/icon.html.twig

{# ===== TAILLES ===== #}

Tailles

Paramètre : size

{% for sizeKey, sizeLabel in {'xs': '12px', 'sm': '16px', 'md': '20px', 'lg': '24px', 'xl': '32px', '2xl': '40px'} %}
{% include '_atoms/icon/icon.html.twig' with { name: 'star', size: sizeKey } %} {{ sizeKey }} ({{ sizeLabel }})
{% endfor %}
{# ===== COULEURS ===== #}

Couleurs

Paramètre : color

{% for colorName in ['current', 'primary', 'success', 'warning', 'error', 'info', 'gray'] %}
{% include '_atoms/icon/icon.html.twig' with { name: 'check', size: 'lg', color: colorName } %} {{ colorName }}
{% endfor %}
{% include '_atoms/icon/icon.html.twig' with { name: 'check', size: 'lg', color: 'white' } %} white
{# ===== DUOTONE ===== #}

Duotone (deux couleurs)

Paramètres : colorPrimary, colorSecondary, opacitySecondary

{% include '_atoms/icon/icon.html.twig' with { name: 'user', size: 'xl', color: 'primary' } %} Couleur unique
{% include '_atoms/icon/icon.html.twig' with { name: 'user', size: 'xl', colorPrimary: 'primary', colorSecondary: 'gray' } %} Primary + Gray
{% include '_atoms/icon/icon.html.twig' with { name: 'user', size: 'xl', colorPrimary: 'success', colorSecondary: 'success', opacitySecondary: '0.3' } %} Opacity 0.3
{% include '_atoms/icon/icon.html.twig' with { name: 'user', size: 'xl', colorPrimary: 'error', colorSecondary: 'warning' } %} Error + Warning
{# ===== SOLAR ICONS - TOUTES ===== #}

Solar Icons (68 icônes)

Source : solar-icons.vercel.app - Style Bold Duotone

{% for icon in [ 'alert', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up', 'bell', 'book', 'buildings', 'calendar', 'cart', 'chart', 'chat', 'check', 'check-circle', 'chevron-left', 'chevron-right', 'chevrons-left', 'chevrons-right', 'clock', 'close', 'cloud', 'crown', 'dialog', 'document', 'download', 'edit', 'exit', 'eye', 'file-text', 'fire', 'folder', 'heart', 'help', 'home', 'home-smile', 'inbox', 'info', 'key', 'list', 'lock', 'logout', 'mail', 'message', 'minus', 'plus', 'power', 'presentation-graph', 'refresh', 'rocket', 'search', 'send', 'server', 'settings', 'shield', 'star', 'target', 'token', 'trash', 'unlock', 'user', 'user-id', 'users', 'users-group', 'users-group-two', 'wallet', 'warning', 'widget-add', 'x' ] %}
{% include '_atoms/icon/icon.html.twig' with { name: icon, size: 'lg', class: 'group-hover:text-primary transition-colors' } %} {{ icon }}
{% endfor %}
{# ===== BUBUL ALIASES ===== #}

Alias Bubul (8 alias)

Noms sémantiques qui pointent vers des icônes Solar

{% for alias, data in { 'bubul-moodia': {'color': 'primary', 'solar': 'widget-add'}, 'bubul-serenia': {'color': 'primary', 'solar': 'chat'}, 'bubul-slidia': {'color': 'primary', 'solar': 'presentation-graph'}, 'bubul-sam': {'color': 'primary', 'solar': 'user-id'}, 'bubul-dashboard': {'color': 'primary', 'solar': 'home-smile'}, 'bubul-entreprise': {'color': 'primary', 'solar': 'buildings'}, 'bubul-utilisateur': {'color': 'primary', 'solar': 'users-group-two'}, 'bubul-contrat': {'color': 'primary', 'solar': 'file-text'} } %}
{% include '_atoms/icon/icon.html.twig' with { name: alias, size: 'xl', color: data.color } %} {{ alias }} → {{ data.solar }}
{% endfor %}
{# ===== EXEMPLE : BOUTONS ===== #}

Exemple : Boutons avec icônes

{# ===== PARAMÈTRES ===== #}

Paramètres

Paramètre Type Défaut Description
namestring(requis)Nom de l'icône
sizestringmdxs, sm, md, lg, xl, 2xl
colorstringcurrentCouleur unique pour les deux couches
colorPrimarystringnullCouleur de la couche primaire (duotone)
colorSecondarystringnullCouleur de la couche secondaire (duotone)
opacitySecondarystring0.5Opacité de la couche secondaire (0-1)
classstring''Classes CSS additionnelles
{% endblock %}