Layout
Cluster
rangée horizontale, éléments centrés en hauteur, qui passe à la ligne
Options
Ce qui s’ajoute au HTML du composant, à combiner entre elles. Le HTML de chaque cas est dans les exemples dessous.
.cluster.cluster--gap-xs
Écarts : comme Stack. Jamais dans un composant : seulement dans une vue ou un gabarit.
HTML
<div class="cluster cluster--gap-xs">
<button class="button button--subtle button--neutral button--sm" type="button">Annuler</button>
<button class="button button--solid button--brand button--sm" type="button">Enregistrer</button>
</div>
.cluster--end · alignés à droite
HTML
<div class="cluster cluster--end cluster--gap-xs">
<button class="button button--subtle button--neutral button--sm" type="button">Annuler</button>
<button class="button button--solid button--brand button--sm" type="button">Enregistrer</button>
</div>
.cluster--between.cluster--mobile-vertical · fin de Register
Aux deux bouts ; en colonne en Mobile, éléments pleine largeur. Aussi : cluster--center.
HTML
<div class="cluster cluster--between cluster--mobile-vertical cluster--gap-md">
<label class="checkbox">
<input class="checkbox__control" type="checkbox" id="cgv" name="cgv" required>
<svg class="icon icon--2xs checkbox__icon" aria-hidden="true"><use href="/icons.svg#icon-check"></use></svg>
<span class="checkbox__label">J’accepte les <a href="#">conditions générales de vente</a></span>
</label>
<button class="button button--solid button--brand button--lg" type="submit">S’inscrire</button>
</div>
.cluster · passe à la ligne
Par défaut, quand la place manque, la rangée passe à la ligne. Redimensionner la fenêtre pour la voir.
HTML
<div class="cluster cluster--gap-xs">
<span class="marker marker--sm" aria-hidden="true">1</span><span class="marker marker--sm" aria-hidden="true">2</span><span class="marker marker--sm" aria-hidden="true">3</span><span class="marker marker--sm" aria-hidden="true">4</span><span class="marker marker--sm" aria-hidden="true">5</span><span class="marker marker--sm" aria-hidden="true">6</span><span class="marker marker--sm" aria-hidden="true">7</span><span class="marker marker--sm" aria-hidden="true">8</span><span class="marker marker--sm" aria-hidden="true">9</span><span class="marker marker--sm" aria-hidden="true">10</span><span class="marker marker--sm" aria-hidden="true">11</span><span class="marker marker--sm" aria-hidden="true">12</span>
</div>
.cluster--nowrap · sur une seule ligne
Pour une rangée qui ne doit jamais se casser (un champ et son bouton, une barre d’outils) : elle déborde ou ses éléments rétrécissent, au lieu de passer à la ligne.
HTML
<div class="cluster cluster--nowrap cluster--gap-xs">
<span class="marker marker--sm" aria-hidden="true">1</span><span class="marker marker--sm" aria-hidden="true">2</span><span class="marker marker--sm" aria-hidden="true">3</span><span class="marker marker--sm" aria-hidden="true">4</span><span class="marker marker--sm" aria-hidden="true">5</span><span class="marker marker--sm" aria-hidden="true">6</span><span class="marker marker--sm" aria-hidden="true">7</span><span class="marker marker--sm" aria-hidden="true">8</span><span class="marker marker--sm" aria-hidden="true">9</span><span class="marker marker--sm" aria-hidden="true">10</span><span class="marker marker--sm" aria-hidden="true">11</span><span class="marker marker--sm" aria-hidden="true">12</span>
</div>
.cluster--top · .cluster--bottom · .cluster--baseline
Placer dans la hauteur, quand les éléments n’ont pas la même : en haut, en bas, sur la ligne de texte. Centrés par défaut.
HTML
<div class="cluster cluster--top cluster--gap-md">
<div class="field">
<label class="field__label" for="cluster-top">Société</label>
<div class="field-control">
<input type="text" id="cluster-top" name="cluster_top" placeholder="Nom de la société">
</div>
</div>
<button class="button button--solid button--brand button--sm" type="button">Rechercher</button>
</div>
<div class="cluster cluster--bottom cluster--gap-md">
<div class="field">
<label class="field__label" for="cluster-bottom">Société</label>
<div class="field-control">
<input type="text" id="cluster-bottom" name="cluster_bottom" placeholder="Nom de la société">
</div>
</div>
<button class="button button--solid button--brand button--sm" type="button">Rechercher</button>
</div>
.cluster__fill · un enfant qui remplit
Sur l’enfant : il prend la place qui reste, les autres gardent leur taille.
HTML
<div class="cluster cluster--nowrap cluster--gap-md">
<div class="field cluster__fill">
<label class="field__label" for="cluster-fill">Société</label>
<div class="field-control">
<input type="text" id="cluster-fill" name="cluster_fill" placeholder="Nom de la société">
</div>
</div>
<span class="badge">Brouillon</span>
</div>