---
title: "Wave Reveal"
description: "Carries one screen into the next with a colourful wave: the card pulls toward the pressed button, a wave leaves from it and bends the screen as it passes, and its colour lingers on the edges. Vertical, horizontal or center."
category: "Components"
publishedAt: "2026-11-25"
updatedAt: "2026-11-25"
documentation: "https://beui.dev/components/motion/wave-reveal"
markdown: "https://beui.dev/components/motion/wave-reveal.md"
license: "MIT"
---

# Wave Reveal

> Carries one screen into the next with a colourful wave: the card pulls toward the pressed button, a wave leaves from it and bends the screen as it passes, and its colour lingers on the edges. Vertical, horizontal or center.

## Install

```bash
npx shadcn@latest add @beui/wave-reveal
```

## Dependencies

- `clsx`
- `lucide-react`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { useState } from "react";
import { WaveReveal } from "@/components/motion/wave-reveal";

export function WaveRevealUsage() {
  const [sent, setSent] = useState(false);

  return (
    // The wave leaves from wherever the button was pressed.
    <WaveReveal
      revealed={sent}
      className="w-72 rounded-2xl border border-border"
      revealedContent={
        <div className="flex flex-col gap-3 p-5">
          <p className="text-sm font-medium">Invite sent</p>
          <button
            type="button"
            onClick={() => setSent(false)}
            className="h-10 rounded-full border border-border text-sm"
          >
            Done
          </button>
        </div>
      }
    >
      <div className="flex flex-col gap-3 p-5">
        <p className="text-sm font-medium">Invite your team</p>
        <button
          type="button"
          onClick={() => setSent(true)}
          className="h-10 rounded-full bg-primary text-sm text-primary-foreground"
        >
          Send invite
        </button>
      </div>
    </WaveReveal>
  );
}
```

## API Reference

### WaveReveal

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `children` | `ReactNode` | — | Yes | The first screen, shown while `revealed` is false. |
| `revealedContent` | `ReactNode` | — | Yes | The screen the wave carries in when `revealed` turns true. |
| `revealed` | `boolean` | — | Yes | Which screen shows. Flip it to play the wave; flipping it back plays the wave again toward the first screen. |
| `type` | `"center" \| "horizontal" \| "vertical"` | `vertical` | No | Shape of the wave front: a wide arc that travels up or down, a tall arc that travels sideways, or a ring from the centre. Default: "vertical" |
| `sourceRef` | `RefObject<HTMLElement \| null>` | — | No | Element the wave leaves from, such as the confirm button. Without it the wave leaves from the last press inside, else from the bottom edge, the left edge or the centre. |
| `duration` | `number` | `1.6` | No | Time the wave takes to cross the screen, in seconds. A short gather before it and the fading edge glow after it add about 1.3s. Default: 1.6 |
| `colors` | `string[]` | `["#ffc915", "#7ec4ff", "#eb64a0", "#ffb07a", "#7fd9ee"]` | No | Colours of the wave and the glow it leaves on the edges, any CSS colour. Default: amber, sky, pink, peach and cyan |
| `distortion` | `number` | `26` | No | How far the wave swells the screen under it, in px. 0 turns the swell off. Default: 26 |
| `onRevealComplete` | `((revealed: boolean) => void)` | — | No | Called when a wave finishes, with the `revealed` value it carried in. |
| `className` | `string` | — | No | Classes merged onto the root element. |

## About Wave Reveal

Wave Reveal is a React screen transition built with Framer Motion. Wrap two screens, such as a confirm step and its success state, and flip revealed: the card pulls toward the button you pressed while light gathers there, then a colourful wave leaves from that point. Under its front the screen swells like a lens with a slight colour split and blurs, the next screen comes in behind it, and the edges keep an uneven glow and a bright hairline that fade after it. Choose a wide arc that travels up, a tall arc that travels sideways, or a ring from the centre. It needs no WebGL: masks swap the screens, an SVG filter does the swell and a backdrop blur softens the front.

### When to use it

- A payment, deploy or invite confirm step should turn into its success screen with a moment of weight.
- A card flips between two states and a plain crossfade feels too quiet.
- A checkout or onboarding step wants a transition that starts from the button that was pressed.

### Accessibility

Only the screen being shown is exposed to assistive technology and takes focus; the other one is inert. When focus was in the outgoing screen, such as on the button that started the wave, it moves to the first control of the incoming screen. The wave layers are hidden from assistive technology and never take pointer events. With reduced motion the screens crossfade with no pull, wave or bend.

### FAQ

**Where does the wave start?**

From the point you pressed inside the card. Pass sourceRef to start from an element's centre instead, which also covers keyboard presses. Without either it starts from the bottom edge, the left edge or the centre, depending on type.

**Can I turn off the bend or change the colours?**

Set distortion to 0 for a clean wave with no bend, or raise it for a stronger lens. Pass colors as CSS colours for the wave front and the edge glow, and duration in seconds.

**Where should padding go?**

On the screens, not on WaveReveal. The wave and the edge glow fill the card's padding box, so padding on the wrapper would keep the glow off the edges.

## Source

- Registry detail: https://beui.dev/r/wave-reveal
- Raw source: https://beui.dev/r/wave-reveal/raw
- GitHub: https://github.com/starc007/ui-components
