{% extends 'base.html.twig' %} {% block title %}Progress - Design System - Bubul{% endblock %} {% block body %}
{% 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
Paramètre : value (0-100)
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' } %}Paramètre : color
Couleurs produits Bubul
{% for colorName in ['moodia', 'serenia', 'slidia', 'sam'] %}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' } %}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 } %}Renouvellement dans 12 jours
Génération du cours
| Paramètre | Type | Défaut | Description |
|---|---|---|---|
value | number | 0 | Valeur actuelle |
max | number | 100 | Valeur maximale |
size | string | 'md' | xs, sm, md, lg |
color | string | 'primary' | primary, success, warning, error, info, moodia... |
showLabel | bool | false | Afficher le pourcentage |
labelPosition | string | 'right' | right, inside, top |
label | string | null | Label personnalisé |
striped | bool | false | Effet rayé animé |
rounded | bool | true | Coins arrondis |