Theme Choice Preview
Picking a look repaints a small preview of the app: the new theme fades in over the old one, its rows rise in turn, and the selection ring slides to the chosen tile.
The animated component in this preview is rendered from the canonical file shown here. The surrounding demo shell only provides context and is not part of the copied code.
import { useState } from "react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
/**
* Vibary · Theme Choice Preview
*
* Picking light, dark or system during setup repaints a small preview
* of the app before the person commits: the new look fades in over theAbout this pattern
Asking someone to choose light, dark or system with three bare words makes them guess what they are agreeing to. This belongs in the appearance step of onboarding, the first-run setup of a desktop app, and the appearance page in settings. Each look is its own layer in a small preview of the app. The chosen one fades in on top of the old one and its rows rise a short way into place, one after another, so the repaint reads as the app being redrawn rather than a color flicker. The old layer clears only once it is covered, so the preview is never blank. The selection ring is a plain border that slides from the old tile to the new one as a short eased tween, tying the choice to its result. There are no springs and no text moves or scales. Under reduced motion the new look fades in and the ring jumps without travel.
Where it shows up
Screens we drew to show where this motion usually sits. Illustrations, not captures of any product.
- Onboarding flow
Choosing Dark fades the dark preview in over the light one and the ring slides to the Dark tile.
- Settings
On the appearance page, picking System splits the preview into light and dark halves as the ring moves over.
Related patterns
- Resume Where You LeftA welcome-back card settles, draws the setup already finished, then marks the step waiting to be picked up.
- Template Gallery PickThe chosen thumbnail grows in place into a preview of the workspace it would create.
- Onboarding Step TransitionThe next panel enters from the right as the current one leaves left, with the progress bar advancing behind them.