Handoff: Card Sequence
What and why
Two to four cards appear one after the other with a line drawn between them while a piece of work runs. The text in each card shimmers while it works. When the work is done it lands on a headline ("You're all set.") with a yellow marker bar behind it, in light and dark. The first use is the end of the business account creation flow, after the person submits the form (a Business account card, then a Workspace card). The ticket's acceptance criteria ask for content-agnostic cards, for reuse in other flows and products.
The component only animates. The screen owns the work, the redirect, and anything that follows (a Spinner with "Taking you to your business account" while the next page loads) or goes wrong (see Accessibility and Expect to change).
- Figma: none (not sent). Prototype: Claude artifact "Business account setup animation", variant 13 (https://claude.ai/artifact/1Yz42QP5L6UpdJbYrgUHG6).
- Context:
context.md,decisions.md,custom.md.
Exploration and decisions
- It started as
NewBusinessAccount, fixed at two cards with eight text props. The ticket's acceptance criteria made it content-agnostic, so it becameCardSequence: a list of{ content, icon? }, 2 to 4. - New component, not a variant of SpinnerSequence (different layout, data and ending; a variant would leave half its props meaningless). The designer chose it.
- Always plays in full: about 3 s per step, so 5 s with two cards, 8 with three, 11 with four.
isCompleteset early waits for the animation; set late, the last card keeps shimmering.onCompletefires 2 s after the landing so the headline can be read. - The shimmer is a mask over the content (any text, or a title and subtitle), not colored text, so the content stays real text and is read once.
- The marker bar is the Badge brand pair, so it is yellow with dark text in both themes (variant 13).
- The closing screen is a plain Spinner on the screen, not part of this component (the prototype used a circled check; the designer chose the Spinner). Nothing new to build.
- No error state in the component (designer's choice, 2026-12-01): a failed or stuck run is the screen's to show.
- Dropped: a title and subtitle as required props on each card (a slot is more general); a second copy of each text for the shimmer.
API
| Prop | Type | Default | Purpose |
|---|---|---|---|
cards |
CardSequenceCard[] |
- | The cards, in order, 2 to 4. Cards after the fourth are not shown. Each is { content: ReactNode; icon?: ReactNode }. |
className |
string |
'' |
Additional class names. |
completeLabel |
string |
- | Headline and screen-reader text once everything is done. |
isComplete |
boolean |
false |
Set to true when the real work is done. The last card keeps shimmering until then. |
onComplete |
() => void |
- | Called once, 2 s after the landing starts. Redirect from here. |
workingLabel |
string |
- | Headline and screen-reader text while the work runs. A trailing full stop is drawn in the brand color. |
CardSequenceText (same file): title (ReactNode), subtitle (ReactNode, optional), className. A title with a smaller secondary subtitle, for the content of a card.
Variants and states: working (cards appearing, last card shimmering) and landed (headline swapped, bar wiped in, last card settled). Stories: Default (the business account flow, lands at 5 s), Three Cards, Four Cards, Free Content (no title and subtitle, no icon), Still Working (never finishes).
Tokens used
--pds-animation-duration-ai-shimmer,--pds-animation-timing-function-default--pds-border-radius-card,--pds-border-width-default--pds-color-badge-brand-background,--pds-color-badge-brand-foreground,--pds-color-border-default,--pds-color-brand-default,--pds-color-card-background,--pds-color-foreground-default,--pds-color-foreground-default-secondary,--pds-color-surface-default-secondary--pds-elevation-raised--pds-spacing-2xl,--pds-spacing-2xs,--pds-spacing-3xs,--pds-spacing-4xl,--pds-spacing-5xs,--pds-spacing-s,--pds-spacing-xl--pds-typography-ff-compact,--pds-typography-fw-medium,--pds-typography-lh-xs,--pds-typography-size-m,--pds-typography-size-xl
Artifact values with no exact token were rounded to the closest: tile 34px to 32px (--pds-spacing-2xl), line 52px to 48px (--pds-spacing-4xl), card padding 14px to 12px (--pds-spacing-s), headline gap 22px to 24px (--pds-spacing-xl). The shimmer sweep is the PDS token (1.6 s), the artifact used 1.35 s.
Impact
impact.md: nothing reaches existing components; everything is scoped to .pds-card-sequence*. No --pds-* token is redefined. No other proposal imports or uses it. SpinnerSequence is a related proposal (same sign-up moment, different shape) and has a "see also" in its decisions.md; the two port independently.
Reused vs net-new
- Reused: package
Icon(in the stories, as theiconslot content),BadgeandFlexContainer(Free Content story only). The ThinkingState shimmer idea (a highlight sweeping through the text), rebuilt as a mask. - Net-new: the component and
CardSequenceText; classes.pds-card-sequenceand its parts (list incustom.md); the registered@property --card-dim; the custom variables--card-dim,--card-start(set inline per card and line),--dim,--peak,--sequence-ease,--sequence-fade,--sequence-sweep. - Raw values kept on purpose (
custom.md): the animation delays and durations and the constantsSTEP_MS,TAIL_MS,LANDING_MS(the choreography is fixed, PDS has only the shimmer duration token), the0.58resting dim level, the18.75remmax width, the SVG linestroke-width, the bar inset (inem, follows the headline type) and the line's easing curve.
Accessibility
- One polite live region (
role='status',visually-hidden) holdsworkingLabel, thencompleteLabelwhen the animation has landed. The visible headline isaria-hiddenso it is not read twice. - The card text is real text and is read once; the shimmer is a visual mask. The tiles, icons and line are decorative (
aria-hidden). Anything that must be read goes incontent, noticon. - No interactive elements, no focus, no keyboard behavior. Do not put interactive elements in the slots.
- Reduced motion: no movement and no shimmer, the final layout shows, and the minimum wait is skipped.
- Every text comes from props or the slots, so it can be translated. A trailing full stop in
workingLabelis split off to color it. - axe (4.14) on Default and Four Cards, light and dark: 0 violations. Color contrast was inconclusive for the dimmed text and the text on the bar in dark mode. The bar text is
--pds-color-badge-brand-foregroundon--pds-color-badge-brand-background, the same in both themes. - Not verified: a screen reader, Three Cards and Free Content with axe, 375px width.
- No error state: the screen shows an error (for example a critical Section Message with Retry) if the work fails, and sets its own timeout, because an unfinished sequence shimmers with no end.
Decisions and open questions
- Name.
CardSequencewas my recommendation and the designer did not confirm it (alternatives offered:CreationProgress,CardFlow,LinkedCards). Recommended: keep it or pick before the port. - Shimmer speed. 1.6 s (the PDS token) against the artifact's 1.35 s. Recommended: keep the token.
- Icon tile in dark mode.
--pds-color-surface-default-secondarywas looked at once, not signed off by the designer. - Hold before
onComplete. 2 s, from the prototype. Recommended: keep, and let the screen change it if a flow needs more.
Extension or new component
New component (L1). Not an addition to an existing PDS component: it has its own timing and state (working, landed) and a different role from Spinner, ThinkingState, Skeleton or the Steppers. Nothing existing is changed and no existing story is touched.
Footprint
- The marker bar is a pseudo-element about half an em wider than the headline on each side and slightly taller. It adds no layout size, but a parent with
overflow: hiddenthat is tighter than the headline would clip it. - The component is at most 300px wide (
18.75rem) and centers itself in its parent; cards fill that column, so long content wraps. - Entrances use a small translate and blur on the cards and headline. A parent with
overflow: hiddencould clip a card's blur edge during the first half second.
Dark mode and per-size values
There are no sizes. Values per theme:
| Part | Light | Dark |
|---|---|---|
| Marker bar | --pds-color-badge-brand-background (yellow) |
same (yellow) |
| Text on the bar | --pds-color-badge-brand-foreground (dark) |
same (dark) |
| Working full stop | --pds-color-brand-default (yellow) |
same |
| Card | --pds-color-card-background, --pds-elevation-raised, --pds-color-border-default |
same tokens, theme values |
| Icon tile | --pds-color-surface-default-secondary, --pds-color-border-default |
same tokens, theme values |
| Line and dots | --pds-color-foreground-default |
same token, theme value |
| Shimmer, resting dim | content at 58% of --pds-color-foreground-default |
same |
| Shimmer, peak | --pds-color-foreground-default |
same |
Expect to change
- Type weight. The headlines and card titles are medium (500) set directly in the component CSS; the
pds-heading-*classes force semibold with!important. Recommended: keep medium as designed, and port to a PDS heading style if one with that weight exists. - Card radius.
--pds-border-radius-card(0.5rem), not Panel's--pds-border-radius-panel(0.75rem), to match the artifact exactly. Recommended: keep; use Panel only if consistency with Panel matters more. - Slot shape.
cardsis an array of{ content, icon? }. A reviewer might prefer children (CardSequencewithCardSequence.Cardparts). Recommended: keep the array, since the component owns the line and the timing per index. - Required label props.
workingLabelandcompleteLabelare required, for the screen-reader text. Recommended: keep. @propertyand CSS masks. Needs current browsers. Where@propertyis missing the card settles without the fade. Recommended: accept.- Hardcoded timing. The choreography is fixed (3 s per card, 2 s tail, 2 s landing hold) and is not a prop. Recommended: keep until a flow needs another rhythm (L11: no knob with one right value).
- Trailing full stop. The component draws a trailing "." of
workingLabelin the brand color. Recommended: drop it if it feels too clever.
Target-version check
Against v2.0.0-beta.21 (the installed package and .pds-reference):
- Icons used in the stories (
building,folder,code,server,files,gear) are in the icon registry. The component itself imports no PDS component. - All tokens above exist in the package CSS, including
--pds-color-badge-brand-backgroundand-foreground(the same in both themes) and--pds-animation-duration-ai-shimmer. - No
CardSequenceor similar component exists in the package.npm run shippeddid not report one.
Port notes
- Would live in
src/components/in the loading indicators category folder (next to Spinner, Skeleton and ThinkingState), generatornpm run generate:component. - Not yet matching v2: the local
mergeClassesstand-in (the package does not export it; the port uses the real one); thestylecustom properties--card-startset per card; the story-onlyDemohelper and the Replay button (drop them). - Keep the card text in the slot as real text so it is read once.
Preview
npm run storybook, then Component Proposals/Loading Indicators/Card Sequence (stories above; the Usage page has Purpose, Usage, Accessibility, Footprint and Implementation). PR: https://github.com/pantheon-systems/pds-proposals/pull/51. Figma: none.