Backgrounds

Mask Blur

Progressive edge blur — stacked backdrop-filter layers dissolve content toward a chosen edge.

Adapted from React Bits

Install

bun add motion clsx tailwind-merge

Then copy 2 files into your project:

  • components/registry/mask-blur/mask-blur.tsx
  • lib/utils.ts

Props

PropTypeDefaultDescription
position"top" | "bottom" | "left" | "right""bottom"Edge the blur attaches to.
strengthnumber1Base blur multiplier applied to every layer.
divCountnumber5Number of stacked blur layers (higher = smoother ramp).
exponentialbooleantrueExponential progression for a stronger blur at the edge.
opacitynumber1Opacity applied to each blur layer.
target"parent" | "page""parent"Attach to the parent container or the viewport (fixed).
tintedbooleanfalseWash the blurred edge with a faint amethyst accent.

What It Demonstrates

Blur
A blur filter used to soften an element or mask tiny imperfections.
Mask
Hiding or revealing parts of an element using a shape or gradient — like clip-path, but with soft, fadeable edges.
Compositing
Letting the GPU move or fade an element on its own layer without redoing layout or paint.

Related Components

Appears In