{% extends 'base.html.twig' %} {% block title %}Landing Social Proof - Design System - Bubul{% endblock %} {% block body %}
Barre de stats avec chiffres en gradient
Barre horizontale affichant 4 statistiques cles avec des valeurs en gradient de couleur.
Chaque stat est separee par une ligne verticale (rendue via CSS ::after).
Entierement parametrable via le tableau stats.
4
Stats defaut
CSS
Separateurs
gradient
Valeurs
reveal
Animation
Apercu des valeurs par defaut
Exemple de code Twig
{% verbatim %}{# Defaut (4 stats Bubul) #}
{% include '_organisms/landing/social-proof.html.twig' only %}
{# Personnalise #}
{% include '_organisms/landing/social-proof.html.twig' with {
stats: [
{
value: '14',
label: 'Voix disponibles',
sublabel: 'francaises',
gradient: 'linear-gradient(135deg, #7C3AED, #A78BFA)'
},
{
value: '99%',
label: 'Satisfaction',
sublabel: 'utilisateurs',
gradient: 'linear-gradient(135deg, var(--color-success-dark), var(--color-success))'
}
]
} only %}{% endverbatim %}
Options de configuration
| Parametre | Type | Defaut | Description |
|---|---|---|---|
stats |
array | (4 stats Bubul) | Tableau de stats. Chaque stat: { value, label, sublabel, gradient } |
class |
string | '' | Classes CSS additionnelles sur la section |
| Cle | Type | Description |
|---|---|---|
value |
string | Valeur affichee en grand (ex: '80+', '20min') |
label |
string | Label principal sous la valeur |
sublabel |
string | Label secondaire (plus petit) |
gradient |
string | CSS gradient pour la valeur (ex: 'linear-gradient(135deg, ...)') |
Implementation
Les lignes verticales entre les stats sont generees via section .grid > div:not(:last-child)::after dans une balise <style> incluse dans le composant.
La grille utilise grid-cols-{{ "{{" }} stats|length {{ "}}" }} pour s'adapter automatiquement au nombre de stats.
Les valeurs colorees utilisent -webkit-background-clip: text avec le gradient passe en style inline.