Skip to main content

Patterns overview

Components are the nouns; patterns are the sentences. A pattern is a reusable composition of components that solves a recurring product problem the same way every time — so a workflow in CommerceOS reads like the same workflow in CampusOS. Live demos are in the Design System → Patterns group; the building-block components are indexed in COMPONENTS.

Workflow​

Process-heavy products (CommerceOS, CampusOS, HealthOS, FinanceOS) share one record lifecycle. Prism provides the pieces:

PatternBuilt fromUse
Record lifecycleStatusPipelineRead-only state of a record moving through a process (draft → submitted → in review → decision). Distinct from Stepper (a wizard the user fills in). A rejected node ends the rail in --negative.
Review & decisionReviewActionBarThe sticky footer for a record under review: approve / request changes / reject, primary weighted, destructive held to the side. Pass summary + meta (reviewer, SLA).
Activity & audit trailActivityTimeline, or AuditLog holding AuditLogEntry rowsChronological "who did what, when", optionally date-grouped, tone-coded (create/edit/delete/view/access/alert).
Draft & autosaveAutosaveIndicator + AlertThe save lifecycle: idle → unsaved → saving → saved → error, plus the leave-guard on navigating away from a dirty form.
Multi-step / wizardMultiStepForm + StepperLong applications and guided setup; review-before-submit; save-as-draft between steps.
Locking & conflict resolutionReadOnlyBanner + side-by-side resolverRecord locked by another user; on save-conflict, choose which version to keep field-by-field.
Assignment / SLA queueTable/DataGrid + Badge + StatusPipelineReviewer queues with ownership, SLA countdown, escalation.
Approval chainApprovalChainWho has to approve, in what order, what they said, and whether the current step is past its SLA.

Lifecycle copy is status-led and neutral ("Sent for approval.", "Changes requested.") — see CONTENT.

Forms​

The form system spans simple fields to long, conditional, multi-step applications:

  • Scaffold: Field wires label + helper + error + aria-describedby for any control. FormSection / FormRow lay them out on the grid.
  • Validation: inline aria-live errors at the field; ErrorSummary at the top of long forms with in-page links. State constraints before the user errs.
  • Orchestration: MultiStepForm, save-as-draft + AutosaveIndicator, dirty-tracking + leave-guard, review-before-submit, read-only / partially-editable / locked forms.
  • Test under RTL, pseudo-localisation, all three densities: compact, neutral, relaxed (QA).

Tables & data​

  • Table — sortable, multi-select, zebra-striped, right-aligned numerics in --font-mono.
  • DataGrid — global search, filter facets, saved views, show/hide and pin columns, inline edit, sticky header, row selection with bulk actions, grouping and aggregate totals. Density is set with the density prop or a saved view. Show a row's status in a cell with a Badge or StatusDot. It does not resize or reorder columns, and it does not virtualise rows.
  • Always provide an accessible summary and a sensible empty/loading/error state.

Permissions & roles​

RestrictedState (no-access / locked / read-only), LockedOverlay (premium gate in place), ReadOnlyBanner, RoleBadge. Choose the right non-availability treatment: hidden vs visible-but-disabled vs visible-with-explanation vs request-access vs requires-upgrade. Use --role-* hues for "viewing as" and scope cues. Permission copy says why it's blocked and the path forward (COMPLIANCE for privacy-sensitive cases).

Empty, loading, error & offline​

EmptyState has six variants (empty for first run, no-results, error, offline, success, permission) in page, section and inline sizes. Pair each with the right copy register and a single clear next action. Loading uses Spinner or ProgressBar, and Skeleton for structured content, — only show a loading message past ~1s.

Privacy & compliance​

Consent (ConsentBanner), sensitive-value masking (MaskedField), data classification (SensitivityTag), audit (AuditLog holding AuditLogEntry rows, or ActivityTimeline for a date-grouped feed), inactivity (SessionTimeoutDialog). Especially for HealthOS / FinanceOS / CampusOS / HospitalityOS — see COMPLIANCE.

Authoring a pattern​

  • Compose existing components — don't reinvent the parts. If a genuinely reusable piece is missing, add it as a component first (COMPONENTS), then compose.
  • Keep the shape identical across products; vary only copy register (per the product tone matrix) and signature.
  • Add a @dsCard in the Patterns group so the composition is discoverable and reviewable.
  • Hold it to the full ACCESSIBILITY and QA checklists — patterns are where focus order, live regions and reflow most often break.