{% extends 'base.html.twig' %} {% block title %}Tool Header - Design System - Bubul{% endblock %} {% block body %}
En-tête de la bibliothèque d'un outil : pastille produit, titre, badge, description, coût médian et actions. S'utilise avec {% verbatim %}{% embed %}{% endverbatim %} pour surcharger le bloc actions quand un outil a plusieurs boutons.
| Paramètre | Type | Défaut | Description |
|---|---|---|---|
| icon | string | requis | Nom d'atome (ex. 'bubul-slidia') |
| title | string | requis | Nom de l'outil |
| description | string | null | Phrase de présentation |
| color | object | null | Entrée de tool_color_details |
| badge | object | null | {label, variant} |
| cost | object | null | {value, unit} — coût médian en tokens |
| primaryAction | object | null | {label, href, icon, disabled} |
| class | string | 'mb-8' | Classes du <header> |
| Bloc | Description |
|---|---|
| actions | Zone de droite. Rend primaryAction par défaut. |
{% verbatim %}{% embed '_organisms/tool-header/tool-header.html.twig' with {
icon: 'bubul-slidia', title: 'Slidia', color: tool_color_details['slidia'],
description: 'Transformez vos idées en présentations.',
primaryAction: { label: 'Créer une présentation', href: path('app_slidia_new'), icon: 'plus' }
} only %}
{% endembed %}
{# ou avec plusieurs boutons #}
{% embed '_organisms/tool-header/tool-header.html.twig' with {
icon: 'bubul-scormia', title: 'Scormia', color: tool_color_details['scormia']
} only %}
{% block actions %}
{# plusieurs boutons ici #}
{% endblock %}
{% endembed %}{% endverbatim %}
Fichier : templates/_organisms/tool-header/tool-header.html.twig