IconButton
Implemented40×40 circular icon-only button. Used in header for notifications, settings, theme toggle. Dark variant in light mode (#1A2332 bg / white fg), neutral in dark mode.
patterns/atoms/iconbutton.htmlIcon-only click target with badge support. Always requires an ariaLabel. FR-CA: Bouton icône avec libellé obligatoire.
IconButton
Interactive atom (Family 1 — Tier 1)
Use for compact actions where an icon carries the meaning.
This component supports light and dark mode.
Usage
import { Star } from '@phosphor-icons/react/dist/ssr'
import { IconButton, PhosphorIcon } from '@epasslive/design-system'
<IconButton icon={<PhosphorIcon icon={Star} size={18} weight="fill" />} ariaLabel="Ajouter aux favoris" variant="ghost" pressed={isFavourite} onClick={() => setFavourite((v) => !v)} />Accessibility
ariaLabelis required.- When
pressedis supplied the button getsaria-pressed. - Tap target is 44×44 CSS pixels in both sizes (
smandmdrender identically — WCAG 2.5.5, DS-CORR-08-10).
Props
icon*React.ReactNodeIcon element rendered inside the button.
ariaLabel*stringFrench action label (e.g. "Fermer", "Ajouter aux favoris").
variant'navy' | 'neutral' | 'ghost'navyBackground contrast variant.
size'sm' | 'md'mdTap target size.
pressedbooleanToggleable state — binds aria-pressed.
badge{ count?: number; showDot?: boolean }Optional badge overlay.
accent'teal' | 'indigo' | 'amber' | 'pink'Brand-accent hover: tints hover background (/10) and hover text with the accent color.
Props
IconButton
iconReact.ReactNode—ariaLabelstring—Required for icon-only buttons (WCAG 4.1.2)
variant'navy' | 'neutral' | 'ghost''navy'size'sm' | 'md''md'badge{ count?: number; showDot?: boolean }—pressedbooleanFalseSets aria-pressed — for toggle buttons
accent'teal' | 'indigo' | 'amber' | 'pink'—Decorative-grade brand accent hover — tints hover bg (at /10) + hover text with the accent color instead of the variant's neutral hover. Alpha /10 steps are pre-registered (ADR-027); no new tokens.
<IconButton />Accessibility
Type
1 ruleARIA
1 ruleUsage
Import
import { IconButton } from "@epasslive/design-system"Example 1
<Button variant="primary">Submit</Button>Example 2
<Button variant="secondary" size="sm">Cancel</Button>Anti-patterns
— Do not compose atoms directly — use molecules instead
— Avoid inline styles on atoms