# Caustics

> Sunlight on the floor of a pool: a shifting web of light over deep water, edged with a faint rainbow, that swells as the cursor passes.

Category: Backgrounds · MotionKit Plus · Updated 2026-11-10 · Live demo: https://www.motionkitui.com/components/caustics

## When to use it

Hotel, spa and travel heroes, swimwear and summer campaigns, water and wellness brands, and calm, sunlit sign-up pages.

## How it works

The light on a pool floor is where ripples on the surface focus the sun into bright, thin lines. The shader fakes that with ridged noise: noise folded at its middle so it forms sharp crests, raised to a high power so only the crests stay bright. Two layers at different sizes drift in different directions over coordinates that are themselves gently warped by noise, so the web keeps reshaping. Sampling three times a hair apart for red, green and blue splits each line into a faint rainbow, and the pointer sends out a decaying ring that bends the light as it passes.

## Installation

Part of MotionKit Plus (https://www.motionkitui.com/pricing). Subscribers install it with `npx shadcn@latest add @motionkit/caustics` after adding their registry token from https://www.motionkitui.com/account.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `colors` | `[string, string, string]` | `["#04161C", "#0E5A66", "#BFF6EE"]` | The depths, the water and the light on it. |
| `speed` | `number` | `1` | How fast the light moves. 0 holds it still. |
| `scale` | `number` | `1` | Pattern size; lower is larger and lazier. |
| `intensity` | `number` | `1` | Brightness of the light lines, 0 to 1.5. |
| `interactive` | `boolean` | `true` | Let the pointer send a swell through the water. |
| `children` | `ReactNode` |  | Your content, layered above. |

## Accessibility

- **Keyboard: Not applicable.** Decorative, nothing to focus.
- **Screen readers: Pass.** The effect is hidden from assistive tech; only your content is read.
- **Reduced motion: Pass.** With reduced motion on, the water is drawn once and holds still. It also stops rendering off screen.
- **Colour contrast: Pass.** The light lines are bright, so keep text on the darker lower half or add a scrim; ivory text measures 16.4:1 on the default depths.
