AuroraDesign System
1.0
Patterns

Morph

The motion primitive everything else is built from. When content changes, the box keeps its place and glides to its new height while the old contents dissolve into the new ones. Nothing is ever swapped.

See it

Nothing needs you until two.
Contrast and lymphatic recovery, 75 minutes.
Surrenne, Knightsbridge.
Toggle between the proposal and the work

How it works

  1. Pin the height. Measure the box and fix its height, so nothing around it moves yet.
  2. Layer both. Put the old and new contents on top of each other, absolutely positioned, and measure the new one.
  3. Glide and cross-dissolve. Animate the height to the new value over 660ms on the glide curve. Fade the old out over 300ms; fade the new in over 460ms, starting 140ms in, so there is never a blank frame.
  4. Release. After 700ms, drop the old layer and let the height go back to auto.
0100200300400500600700800
Heightglide
660ms
Old contents outsoft
300ms
New contents insoft
460ms

When to morph

Proposal → Work → Entry
Do

Morph when one thing becomes another in the same place: a proposal into the work, the work into the result.

Day view → Settings
Don’t

Don’t morph between unrelated content, like changing pages or tabs. That is navigation, and a cross-fade of the whole view is enough.

Code

import { Morph } from './aurora';

// Change contentKey and the box morphs to whatever the children are now.
<Morph contentKey={phase}>
  {phase === 'offer' && <SuggestionCard {...s} onConfirm={() => setPhase('working')} />}
  {phase === 'working' && <ExecutionSteps steps={s.steps} />}
  {phase === 'settled' && <Entry {...s.done} />}
</Morph>