Checkbox

Sélection binaire indépendante — cocher/décocher une option ou marquer une tâche faite. Forme carrée par convention (NN/g) : le rond signale un bouton radio. Le libellé est cliquable et la cible tactile fait ≥ 24px (WCAG 2.5.8). Independent binary selection — check/uncheck an option or mark a task done. Square shape by convention (NN/g): round signals a radio button. The label is clickable and the touch target is ≥ 24px (WCAG 2.5.8).

ÉtatsStates

Default · Checked · IndeterminateDefault · Checked · Indeterminate
Recevoir la newsletterReceive the newsletter Notifications activéesNotifications enabled Tout sélectionner (partiel)Select all (partial)
DésactivéDisabled
Option indisponibleOption unavailable Option verrouilléeLocked option

Règles absoluesAbsolute rules

Tokens de composantComponent tokens

Token CSSRéférence sémantiqueSemantic referenceValeur résolueResolved value
--agtc-checkbox-default-backgroundsemantic.color.background.surface#ffffff
--agtc-checkbox-default-bordersemantic.color.border.default#e8e8e8
--agtc-checkbox-default-border-hoversemantic.color.action.primary#007a68
--agtc-checkbox-default-border-focussemantic.color.border.focus#007a68
--agtc-checkbox-default-fillsemantic.color.action.primary#007a68
--agtc-checkbox-default-fill-hoversemantic.color.action.primary-hover#0d3d38
--agtc-checkbox-default-checksemantic.color.text.on-action#ffffff
--agtc-checkbox-default-labelsemantic.color.text.primary#202020
--agtc-checkbox-default-radiussemantic.radius.control6px

AccessibilitéAccessibility

ImplémentationImplementation

<!-- Basique -->
<agtc-checkbox label="Recevoir la newsletterReceive the newsletter" name="newsletter"></agtc-checkbox>

<!-- Cochée -->
<agtc-checkbox label="Notifications activéesNotifications enabled" checked></agtc-checkbox>

<!-- Parent d'un groupe « tout cocher » -->
<agtc-checkbox label="Tout sélectionnerSelect all" indeterminate></agtc-checkbox>

<!-- Texte en slot -->
<agtc-checkbox>J'accepte lesI accept the <a href="/cgu">conditionsterms</a></agtc-checkbox>

DOs et DON'TsDOs and DON'Ts

À faireDo

  • Utiliser une checkbox pour une sélection indépendante (0–N)Use a checkbox for independent selection (0–N)
  • Formuler le libellé positivementPhrase the label positively
  • Écouter agtc-change pour réagir à la basculeListen to agtc-change to react to toggling

À éviterDon't

  • Forme ronde — confusion avec un radioRound shape — confusion with a radio
  • Checkbox pour un réglage à effet immédiat — préférer un toggleCheckbox for an immediate-effect setting — prefer a toggle
  • Case pré-cochée pour un consentementPre-checked consent box

UX Patterns Reference

Patterns approved by the Design System Lead via the ux-pattern-review workflow (see .claude/rules/ux-patterns-sources.md and ADR-036). Decision: all approved.

PatternSourceAppliedJustification
Checkbox (not toggle) for an independent itemNN/g — checkbox vs toggleIndependent 0–N selection, not an immediate-effect setting
Square shape (a circle signals a radio)NN/g — checkboxesUsability convention; deliberate departure from the round ToDo mockup
Clickable label (box or text) — Fitts's lawNN/g — checkboxes · IxDFImplicit <label> wrapping box + text
Touch target ≥ 24×24pxIxDF — touch targets.root min-height 24px (WCAG 2.5.8)
Complete visible states (default/hover/focus/checked/disabled)NN/g — checkboxesAffordance and immediate feedback
Positively phrased label (no negation)NN/g — checkboxeslabel writing rule (documented anti-pattern)
No pre-checked consent (anti-dark-pattern)IxDF — deceptive patternschecked defaults to false
Native ARIA semantics (role=checkbox, aria-checked)NN/g — checkboxesNative <input type="checkbox">, indeterminatemixed
Contribuer à ce projet Contribute to this project

Ce système est ouvert aux contributions — tokens, composants, décisions architecturales, corrections d'accessibilité ou documentation. Toute amélioration est bienvenue. This system welcomes contributions — tokens, components, architectural decisions, accessibility fixes, or documentation. Every improvement counts.

Voir sur GitHub View on GitHub