Passer au contenu principal

Golden examples

Six copy-paste composite patterns that demonstrate canonical DS consumption. Each one is regression-tested with a vitest snapshot — a PR that breaks any example will be flagged with a clear diff.

1. Settings form

Composes Input, Select, Switch, Checkbox, ResponsiveFieldGroup, and Button into a single accessible form. Submit handler is a controlled callback.

Account settings

Update your display preferences and notification options.

Affects the language used across the dashboard.

Notifications

2. Data table

Composes AdminSortableTable + TableToolbar + StatusBadge + Badge + Button into a searchable, sortable table with row actions.

Events

99+
Events (sortable)
Status
Folk Prints FestivalPlace des Festivals04500Draft
Jazz au Lion d'OrLion d'Or — Montréal124180Live
Soirée SymphoniqueMaison symphonique9801200Sold out

4. Detail page

Composes BreadcrumbBar + StatusBadge + Badge + Button + StatGrid into a header / metrics / body layout.

Jazz au Lion d'Or

Live99+
Tickets sold
124/ 180
Utilization
69%
Revenue
$1 240 CAD
Attendees
118

Doors open at 19:30. Two-drink minimum.

5. Dark-mode card

Composes PaymentMethodCard + StatCard + Button + Badge on the dark surface token (bg-ep-bg-page-dark). Color tokens flip automatically in dark mode — no inline colors.

Billing overview

Manage payment methods and review account metrics.

Lifetime value
$1 240 CAD
Active subscriptions
18
Next invoice
$129 CAD
Refunds (30d)
0

Payment methods

  • VisaDefault

    •••• 4242

    Expires 12/28

  • Mastercard

    •••• 5454

    Expires 06/27

2

6. Accessible alert

Composes Alert + Button with all four variants. Errors get role="alert" (assertive live region); success / warning / info use role="status" (polite live region). Test assertions live in accessible-alert.test.tsx.

Notifications

Urgent errors are announced assertively; routine notifications politely.

  • Payment received

    Your invoice was paid successfully.
  • Heads up

    Capacity for Jazz au Lion d'Or is at 80%.
  • New feature

    Dark mode is now available in account settings.
Exemples — Systeme de design ePassLive