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

Progress

Barre de progression pour tâches et quotas

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

Usage

{% verbatim %}{# Progress simple #}
{% include '_atoms/progress/progress.html.twig' with {
    value: 65
} %}

{# Avec label et couleur #}
{% include '_atoms/progress/progress.html.twig' with {
    value: 75,
    color: 'success',
    showLabel: true
} %}

{# Pour affichage de tokens #}
{% include '_atoms/progress/progress.html.twig' with {
    value: 2500,
    max: 10000,
    showLabel: true,
    label: '2 500 / 10 000 tokens'
} %}{% endverbatim %}

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

{# ===== BASIQUE ===== #}

Progression basique

Paramètre : value (0-100)

{% include '_atoms/progress/progress.html.twig' with { value: 0 } %} {% include '_atoms/progress/progress.html.twig' with { value: 25 } %} {% include '_atoms/progress/progress.html.twig' with { value: 50 } %} {% include '_atoms/progress/progress.html.twig' with { value: 75 } %} {% include '_atoms/progress/progress.html.twig' with { value: 100 } %}
{# ===== TAILLES ===== #}

Tailles

Paramètre : size

Extra Small (xs) - 4px

{% include '_atoms/progress/progress.html.twig' with { value: 60, size: 'xs' } %}

Small (sm) - 8px

{% include '_atoms/progress/progress.html.twig' with { value: 60, size: 'sm' } %}

Medium (md) - 12px (défaut)

{% include '_atoms/progress/progress.html.twig' with { value: 60, size: 'md' } %}

Large (lg) - 16px

{% include '_atoms/progress/progress.html.twig' with { value: 60, size: 'lg' } %}
{# ===== COULEURS ===== #}

Couleurs

Paramètre : color

{% for colorName in ['primary', 'success', 'warning', 'error', 'info', 'gray'] %}
{{ colorName }} {% include '_atoms/progress/progress.html.twig' with { value: 65, color: colorName, showLabel: true } %}
{% endfor %}

Couleurs produits Bubul

{% for colorName in ['moodia', 'serenia', 'slidia', 'sam'] %}
{{ colorName }} {% include '_atoms/progress/progress.html.twig' with { value: 70, color: colorName, showLabel: true } %}
{% endfor %}
{# ===== LABELS ===== #}

Labels

Paramètres : showLabel, labelPosition, label

Label à droite (défaut)

{% include '_atoms/progress/progress.html.twig' with { value: 65, showLabel: true, labelPosition: 'right' } %}

Label en haut

{% include '_atoms/progress/progress.html.twig' with { value: 65, showLabel: true, labelPosition: 'top' } %}

Label à l'intérieur (taille lg recommandée)

{% include '_atoms/progress/progress.html.twig' with { value: 65, showLabel: true, labelPosition: 'inside', size: 'lg' } %}

Label personnalisé

{% include '_atoms/progress/progress.html.twig' with { value: 2500, max: 10000, showLabel: true, label: '2 500 / 10 000 tokens' } %}
{# ===== EFFETS ===== #}

Effets

Paramètres : striped, rounded

Normal

{% include '_atoms/progress/progress.html.twig' with { value: 65, color: 'primary' } %}

Rayé animé (striped)

{% include '_atoms/progress/progress.html.twig' with { value: 65, color: 'primary', striped: true } %}

Sans arrondi

{% include '_atoms/progress/progress.html.twig' with { value: 65, color: 'primary', rounded: false } %}
{# ===== EXEMPLES CONCRETS ===== #}

Exemples concrets

{# Upload #}
Upload en cours... document.pdf
{% include '_atoms/progress/progress.html.twig' with { value: 67, color: 'primary', showLabel: true, striped: true } %}
{# Quota tokens #}
Tokens utilisés ce mois {% include '_atoms/icon/icon.html.twig' with { name: 'token', size: 'sm', color: 'primary' } %}
{% include '_atoms/progress/progress.html.twig' with { value: 7500, max: 10000, color: 'warning', showLabel: true, label: '7 500 / 10 000' } %}

Renouvellement dans 12 jours

{# Étapes de génération #}

Génération du cours

{% include '_atoms/icon/icon.html.twig' with { name: 'check', size: 'sm', color: 'success' } %} Analyse du PDF {% include '_atoms/progress/progress.html.twig' with { value: 100, color: 'success', size: 'xs', class: 'w-24' } %}
{% include '_atoms/icon/icon.html.twig' with { name: 'check', size: 'sm', color: 'success' } %} Structure du cours {% include '_atoms/progress/progress.html.twig' with { value: 100, color: 'success', size: 'xs', class: 'w-24' } %}
{% include '_atoms/spinner/spinner.html.twig' with { size: 'xs', color: 'primary' } %} Génération du contenu {% include '_atoms/progress/progress.html.twig' with { value: 45, color: 'primary', size: 'xs', striped: true, class: 'w-24' } %}
Placement des images {% include '_atoms/progress/progress.html.twig' with { value: 0, color: 'gray', size: 'xs', class: 'w-24' } %}
{# ===== PARAMÈTRES ===== #}

Paramètres

Paramètre Type Défaut Description
valuenumber0Valeur actuelle
maxnumber100Valeur maximale
sizestring'md'xs, sm, md, lg
colorstring'primary'primary, success, warning, error, info, moodia...
showLabelboolfalseAfficher le pourcentage
labelPositionstring'right'right, inside, top
labelstringnullLabel personnalisé
stripedboolfalseEffet rayé animé
roundedbooltrueCoins arrondis
{% endblock %}