# Light Leak

> Warm light seeping into a film frame: orange and rose blooms drift in from the edges and fade, a burn streak flares across, and fine grain flickers over it all.

Category: Backgrounds · Free · Updated 2026-11-10 · Live demo: https://www.motionkitui.com/components/light-leak

## When to use it

Photography, film and music sites, fashion and lifestyle brands, and any hero that should feel warm, nostalgic and shot on film.

## How it works

Three large radial gradients sit just outside the edges of the frame with a screen blend. A keyframe moves each one inwards while it brightens and fades, offset so there's always one blooming. A blurred band of warm light sweeps across now and then for the burn streak, and a tile of SVG noise jumps between positions a few times a second with an overlay blend for the flicker of grain. A radial vignette darkens the corners. Everything is transform and opacity, so the browser animates it on the GPU.

## Installation

```bash
npx shadcn@latest add https://www.motionkitui.com/r/light-leak.json
```

Or copy `components/motionkit/light-leak.tsx` below. Requires react and Tailwind CSS v4. Free for personal projects; commercial use needs MotionKit Plus (https://www.motionkitui.com/pricing).

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` |  | Your content, layered above the leaks. |
| `colors` | `[string, string, string]` | `orange, amber, rose` | Colours of the leaks and the burn. |
| `background` | `string` | `"#0C1010"` | Colour underneath. |
| `grain` | `number` | `0.18` | How visible the film grain is, 0 to 0.5. |
| `duration` | `number` | `14` | Seconds for each leak to bloom and fade. |
| `vignette` | `boolean` | `true` | Darken the corners, like an old lens. |

## Accessibility

- **Keyboard: Not applicable.** A decorative background.
- **Screen readers: Pass.** Every layer is hidden; only your content is read.
- **Reduced motion: Pass.** With reduced motion on, the leaks rest as a soft still glow, the streak is removed and the grain stops.
- **Colour contrast: Partial.** Ivory text measures 17:1 on the dark between leaks and stays above 4.5:1 over a half-bright bloom, but drops below 2:1 where the amber leak peaks. The leaks gather at the edges, so keep text towards the middle.

## Source

```tsx
"use client";

import type { CSSProperties, ReactNode } from "react";

type LightLeakProps = {
  children?: ReactNode;
  /** Three warm colours for the leaks and the burn. */
  colors?: [string, string, string];
  /** Colour underneath. */
  background?: string;
  /** 0 to 0.5. How visible the film grain is. */
  grain?: number;
  /** Seconds for each leak to bloom and fade. */
  duration?: number;
  /** Darken the corners, as an old lens does. */
  vignette?: boolean;
  className?: string;
};

const NOISE =
  "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E\")";

// where each leak blooms from and drifts to, so light seems to seep in round the edge of the frame
const LEAKS = [
  { box: "-left-[20%] -top-[25%] h-[90%] w-[70%]", from: "-8%, -6%", to: "6%, 4%", color: 0, peak: 0.95, offset: 0 },
  { box: "-right-[25%] top-[10%] h-[100%] w-[65%]", from: "10%, 0%", to: "-4%, 6%", color: 2, peak: 0.85, offset: 0.33 },
  { box: "-bottom-[30%] left-[15%] h-[80%] w-[80%]", from: "0%, 12%", to: "-6%, -2%", color: 1, peak: 0.85, offset: 0.66 },
] as const;

/**
 * Warm light seeping into a film frame: blooms of orange and rose drift in from the edges, burn bright and fade, a
 * streak flares across now and then, and fine grain flickers over it all. Pure CSS, so it costs next to nothing.
 */
export function LightLeak({ children, colors = ["#FF8A4C", "#FFC46B", "#E2557A"], background = "#0C1010", grain = 0.18, duration = 14, vignette = true, className = "" }: LightLeakProps) {
  return (
    <div data-leak="" className={`relative isolate overflow-hidden ${className}`} style={{ backgroundColor: background }}>
      <style>{`
@keyframes leak-bloom{0%{opacity:0;transform:translate3d(var(--leak-from),0) scale(.85)}35%{opacity:var(--leak-peak)}60%{opacity:calc(var(--leak-peak)*.55)}100%{opacity:0;transform:translate3d(var(--leak-to),0) scale(1.15)}}
@keyframes leak-burn{0%,62%{transform:translateX(-60%) skewX(-10deg);opacity:0}70%{opacity:.8}84%{opacity:.35}100%{transform:translateX(560%) skewX(-10deg);opacity:0}}
@keyframes leak-grain{0%{transform:translate(0,0)}20%{transform:translate(-4%,3%)}40%{transform:translate(3%,-5%)}60%{transform:translate(-2%,6%)}80%{transform:translate(5%,-2%)}100%{transform:translate(0,0)}}
@media (prefers-reduced-motion:reduce){[data-leak] [data-leak-layer]{animation:none!important;opacity:calc(var(--leak-peak,.6)*.6)!important}[data-leak] [data-leak-burn]{display:none}}
`}</style>
      {LEAKS.map((leak, index) => (
        <div
          key={index}
          aria-hidden
          data-leak-layer=""
          className={`pointer-events-none absolute -z-10 rounded-full mix-blend-screen ${leak.box}`}
          style={
            {
              background: `radial-gradient(closest-side, ${colors[leak.color]}, color-mix(in srgb, ${colors[leak.color]} 40%, transparent) 50%, transparent)`,
              "--leak-from": leak.from,
              "--leak-to": leak.to,
              "--leak-peak": leak.peak,
              opacity: 0,
              animation: `leak-bloom ${duration}s ease-in-out ${-leak.offset * duration}s infinite`,
              willChange: "transform, opacity",
            } as CSSProperties
          }
        />
      ))}
      {/* a burn streak, as when the film runs past a gap in the camera */}
      <div
        aria-hidden
        data-leak-layer=""
        data-leak-burn=""
        className="pointer-events-none absolute inset-y-[-10%] left-0 -z-10 w-[22%] mix-blend-screen"
        style={{
          background: `linear-gradient(90deg, transparent, color-mix(in srgb, ${colors[1]} 55%, transparent) 35%, rgb(255 244 225 / 0.55) 50%, color-mix(in srgb, ${colors[2]} 50%, transparent) 65%, transparent)`,
          filter: "blur(18px)",
          opacity: 0,
          animation: `leak-burn ${duration * 1.4}s ease-in-out ${-duration * 0.2}s infinite`,
          willChange: "transform, opacity",
        }}
      />
      {grain > 0 && (
        <div
          aria-hidden
          data-leak-layer=""
          className="pointer-events-none absolute -inset-[20%] -z-10 mix-blend-overlay"
          style={{ backgroundImage: NOISE, opacity: grain * 1.6, animation: "leak-grain 0.7s steps(5) infinite" }}
        />
      )}
      {vignette && <div aria-hidden className="pointer-events-none absolute inset-0 -z-10" style={{ background: "radial-gradient(ellipse at center, transparent 45%, rgb(0 0 0 / 0.55) 100%)" }} />}
      {children}
    </div>
  );
}
```
