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

Step Indicator

Indicateur de progression pour wizards et processus multi-etapes

{# ===== COMPOSITION ===== #}

Composition

Icon + Typography = Step Indicator
{# ===== USAGE ===== #}

Usage

{% verbatim %}{% include '_molecules/step-indicator/step-indicator.html.twig' with {
    steps: [
        { id: 'upload', label: 'Document', icon: 'document' },
        { id: 'config', label: 'Configuration', icon: 'settings' },
        { id: 'generate', label: 'Generation', icon: 'rocket' }
    ],
    currentStep: 2
} %}{% endverbatim %}

Fichier : templates/_molecules/step-indicator/step-indicator.html.twig

{# ===== HORIZONTAL (DEFAULT) ===== #}

Horizontal (default)

Ideal pour les wizards et processus en plusieurs etapes

Etape 1/5

{% include '_molecules/step-indicator/step-indicator.html.twig' with { steps: [ { id: 'upload', label: 'Document', icon: 'document' }, { id: 'config', label: 'Configuration', icon: 'settings' }, { id: 'generate', label: 'Generation', icon: 'rocket' }, { id: 'preview', label: 'Apercu', icon: 'eye' }, { id: 'deploy', label: 'Deploiement', icon: 'cloud' } ], currentStep: 1 } %}

Etape 3/5

{% include '_molecules/step-indicator/step-indicator.html.twig' with { steps: [ { id: 'upload', label: 'Document', icon: 'document' }, { id: 'config', label: 'Configuration', icon: 'settings' }, { id: 'generate', label: 'Generation', icon: 'rocket' }, { id: 'preview', label: 'Apercu', icon: 'eye' }, { id: 'deploy', label: 'Deploiement', icon: 'cloud' } ], currentStep: 3 } %}

Etape 5/5 (terminé)

{% include '_molecules/step-indicator/step-indicator.html.twig' with { steps: [ { id: 'upload', label: 'Document', icon: 'document' }, { id: 'config', label: 'Configuration', icon: 'settings' }, { id: 'generate', label: 'Generation', icon: 'rocket' }, { id: 'preview', label: 'Apercu', icon: 'eye' }, { id: 'deploy', label: 'Deploiement', icon: 'cloud' } ], currentStep: 5 } %}
{# ===== VERTICAL ===== #}

Vertical

Parametre : variant: 'vertical'

Etape 2/4

{% include '_molecules/step-indicator/step-indicator.html.twig' with { steps: [ { id: 'info', label: 'Informations personnelles' }, { id: 'address', label: 'Adresse de livraison' }, { id: 'payment', label: 'Paiement' }, { id: 'confirm', label: 'Confirmation' } ], currentStep: 2, variant: 'vertical' } %}

Avec icones

{% include '_molecules/step-indicator/step-indicator.html.twig' with { steps: [ { id: 'info', label: 'Informations', icon: 'user' }, { id: 'address', label: 'Adresse', icon: 'home' }, { id: 'payment', label: 'Paiement', icon: 'wallet' }, { id: 'confirm', label: 'Confirmation', icon: 'check-circle' } ], currentStep: 3, variant: 'vertical' } %}
{# ===== TAILLES ===== #}

Tailles

Parametre : size

Small (sm)

{% include '_molecules/step-indicator/step-indicator.html.twig' with { steps: [ { id: '1', label: 'Etape 1' }, { id: '2', label: 'Etape 2' }, { id: '3', label: 'Etape 3' } ], currentStep: 2, size: 'sm' } %}

Medium (md) - default

{% include '_molecules/step-indicator/step-indicator.html.twig' with { steps: [ { id: '1', label: 'Etape 1' }, { id: '2', label: 'Etape 2' }, { id: '3', label: 'Etape 3' } ], currentStep: 2, size: 'md' } %}

Large (lg)

{% include '_molecules/step-indicator/step-indicator.html.twig' with { steps: [ { id: '1', label: 'Etape 1' }, { id: '2', label: 'Etape 2' }, { id: '3', label: 'Etape 3' } ], currentStep: 2, size: 'lg' } %}
{# ===== SANS LABELS ===== #}

Sans labels

Parametre : showLabels: false

{% include '_molecules/step-indicator/step-indicator.html.twig' with { steps: [ { id: '1', label: 'Etape 1', icon: 'document' }, { id: '2', label: 'Etape 2', icon: 'settings' }, { id: '3', label: 'Etape 3', icon: 'rocket' }, { id: '4', label: 'Etape 4', icon: 'check-circle' } ], currentStep: 2, showLabels: false } %}
{# ===== PARAMETRES ===== #}

Parametres

Parametre Type Defaut Description
stepsarray(requis)Liste des etapes [{id, label, icon?}]
currentStepnumber1Numero de l'etape active (1-based)
variantstringhorizontalLayout : horizontal, vertical
sizestringmdTaille : sm, md, lg
showLabelsbooltrueAfficher les labels
clickableboolfalseEtapes completees cliquables
classstring''Classes additionnelles
{# ===== STRUCTURE STEP ===== #}

Structure d'une etape

Propriete Type Requis Description
idstringouiIdentifiant unique de l'etape
labelstringouiTexte affiche sous/a cote du cercle
iconstringnonIcone affichee dans le cercle (sinon numero)
{% endblock %}