Circle Reveal

Screen transition that floods the next screen’s colour out from the button you tapped, as a growing circle with a lit rim. Your app swaps screens under it and can move shared elements along.

Preview

Installation

npx
npx @lumioui/cli add circle-reveal

Usage

import { CircleReveal } from "@/components/ui/circle-reveal/circle-reveal";
<CircleReveal />

Examples

Order placed

Food delivery checkout.

Slide to shop

A dark product hero for a running drop.

Theme switch

Display settings in a reading app.

API reference

Prop Type Default
active boolean

Declarative trigger: false → true reveals, true → false conceals. Optional — the imperative ref handle works without it.

—
origin CircleRevealOrigin

Origin in the overlay's coordinates. Default bottom-centre.

—
color string

Reveal fill — the NEXT screen's background. Default theme background.

—
concealColor string

Conceal fill — the PREVIOUS screen's background. Default color.

—
duration number

Reveal flood in ms. Default 315 (tempo.settle).

REVEAL_MS
concealDuration number

Conceal flood in ms. Default 250 — going back runs quicker than the commit.

CONCEAL_MS
onCovered (revealed: boolean) => void

Circle fully covers the surface — swap content now. revealed is true after a reveal, false after a conceal.

—
onDone (revealed: boolean) => void

The circle has faded away and the transition is complete.

—
rim boolean

Lit leading rim on the flood's edge. Default true.

true
rimColor string

Rim colour. Default: a dark hairline on a light flood, soft white on a dark one.

—
revealContent React.ReactNode

The next screen, seen through the circle while it grows on reveal.

—
concealContent React.ReactNode

The previous screen, seen through the circle while it grows on conceal.

—
announce
string | ((revealed: boolean) … string | ((revealed: boolean) => string | undefined)

Spoken when the circle covers — a string, or per direction.

—
children
React.ReactNode | ((revealed: SharedValu … React.ReactNode | ((revealed: SharedValue<number>) => React.ReactNode)

Rendered above the circle (shared elements). A function receives the revealed shared value, 0 → 1 on reveal and 1 → 0 on conceal.

—
className string —