← All proposals

Card Sequence

A new component, CardSequence, in the loading indicators family.

Net-new componentOpen in Storybook

proposals/CardSequence/decisions.md79 lines · View on GitHub

Decisions: Card Sequence

New component, not a variant of SpinnerSequence

  • Decision: a separate component, in the loading indicators family (Storybook Component Proposals/Loading Indicators/Card Sequence). SpinnerSequence only gets a "see also".
  • Why: it has its own layout (cards, line, headline and bar) and data; a variant on SpinnerSequence would leave half its props meaningless. The designer chose it.
  • Port impact: none. Only this new group exists in Storybook; Spinner and SpinnerSequence were not moved into it.

Generic cards with content slots, 2 to 4 (2026-12-01)

  • Decision: cards is a list of { content, icon? }, 2 to 4 (any after the fourth are not shown). The first design was fixed at two cards with eight text props and was named NewBusinessAccount; the ticket's acceptance criteria asked for content-agnostic cards for reuse, so it was reworked and renamed CardSequence (the designer asked for more name ideas and gave no pick; CardSequence was my recommendation).
  • Why: reuse in other flows and products. A content slot instead of title and subtitle props keeps it content-agnostic; CardSequenceText keeps the title and subtitle structure for the common case.
  • Port impact: the name is open (alternatives offered: CreationProgress, CardFlow, LinkedCards).

The shimmer is a mask over the content

  • Decision: the shimmer dims the card's content with a gradient mask and sweeps a bright band through it, instead of coloring the text. A registered --card-dim property animates from 0.58 to 1 when the card settles.
  • Why: it works on any content (text, a title and subtitle, a badge) without the content knowing, and the text stays real text, read once (the first build drew a second copy of each text for the shimmer).
  • Port impact: needs @property and CSS masks (current browsers). Where @property is missing the card settles without the fade.

The animation is a minimum, isComplete is the finish

  • Decision: the choreography (about 3 s per step, so 5 s with two cards) always plays in full. isComplete set earlier waits for it; set later, the last card keeps shimmering. onComplete fires 2 seconds after the landing starts (the headline stays readable, as in the prototype), so the redirect follows the whole animation.
  • Why: the designer wants the user to see all of it before the redirect; the real work takes a few seconds either way. With more cards, the same rhythm (designer's call).
  • Port impact: with reduced motion there is no wait (the final layout shows as soon as isComplete is true).

Cards use the card radius, not the Panel

  • Decision: the cards are plain elements with --pds-border-radius-card (0.5rem), --pds-elevation-raised and --pds-color-border-default, not the package Panel (0.75rem).
  • Why: the designer asked to match the artifact's corners and shadows with the closest tokens; the artifact values are exactly those tokens.
  • Port impact: the engineer may prefer Panel for consistency; say so in the handoff.

Closest-token values

  • Decision: artifact values with no exact token were rounded to the closest one: tile 34px to --pds-spacing-2xl (32px), line 52px to --pds-spacing-4xl (48px), card padding 14px to --pds-spacing-s (12px), headline spacing 22px to --pds-spacing-xl (24px). The shimmer sweep uses --pds-animation-duration-ai-shimmer (artifact: 1.35 s; the token is the ThinkingState time).
  • Why: tokens only (rule 2).
  • Port impact: none.

Marker bar colors

  • Decision: bar --pds-color-badge-brand-background, text --pds-color-badge-brand-foreground. Both stay the same in light and dark, which gives the yellow bar with dark text in both themes (variant 13). The yellow full stop in the working headline is --pds-color-brand-default.
  • Why: foreground-default and foreground-reverse flip with the theme; the Badge brand pair does not.
  • Port impact: none.

Trailing full stop drawn in the brand color

  • Decision: if workingLabel ends with ".", the component draws it in the brand color.
  • Why: keeps the artifact's detail without a second prop. The complete headline's stop stays in the text color, on the bar.
  • Port impact: none; drop it if the engineer finds it too clever.

Headlines and card titles are medium, set directly

  • Decision: the two headlines (--pds-typography-size-xl) and the card title (--pds-typography-size-m) use the compact font at --pds-typography-fw-medium (500), set in the component CSS, not the pds-heading-* classes (semibold).
  • Why: the designer prefers medium (the artifact's weight). The pds-* type classes use !important, so the weight cannot be overridden on the same element. All values are PDS tokens.
  • Port impact: the engineer may prefer a PDS heading style; none is medium today.

Icons and icon size (first use)

  • Decision: the first use shows building and folder at size='l' in the 32px tile. The designer chose the singular icons over buildings and folders and one size below the default xl (2026-11-30). The icon is the card's icon slot, so each use picks its own.
  • Why: xl was too big for the tile.
  • Port impact: none; the icons exist in the PDS Icon set.

The closing screen is the package Spinner, nothing new

  • Decision: after "You're all set." the screen shows the package Spinner with "Taking you to your business account" while the next page loads. It is not part of this component and has no story here (a demo story was added and removed on 2026-11-30). The prototype used a circled check; the designer chose a plain Spinner for now.
  • Why: "You're all set." already says done, and the next page load is a real wait, so the Spinner is honest. A check would repeat "done" and look stuck on a slow load. No new component to build.
  • Port impact: none. If the check comes back, it is a small new component (the check artwork exists in the SpinnerSequence proposal). The swap and the redirect belong to the screen.

No error state in the component

  • Decision: the component has no error state. A failed or stuck run is the screen's: it stops showing the component and shows an error (for example a critical Section Message with a Retry), and sets its own timeout. The Usage page says so. The designer chose this (2026-12-01).
  • Why: what an error needs (which step failed, retry, support) varies by flow; PDS already has the error patterns; it keeps the API small. Without a timeout an unfinished sequence shimmers forever, so the Usage note asks for one.
  • Port impact: none. An in-place failed state (the cards stay, the failed step is marked) would be a later isFailed-style prop.

Open questions

  • Final name (CardSequence is a placeholder from my recommendation). Designer.
  • Does the icon tile (--pds-color-surface-default-secondary) read right in dark mode? Designer, by eye.