UIPin
ComponentsIconsIllustrationsMotionTemplatesApps
Boards
UIPin

Free, open-source UI components, icons, illustrations, motion, templates and apps, in one search. Every item links to its source and licence.

UIPin is free. If it saved you time, you can keep it running:

Buy me a coffee
ComponentsIconsIllustrationsMotionTemplatesAppsLibrariesCompareNew this weekMCP for agentsBoardsPrivacy

Components, icons and artwork belong to their authors and are shown under their open-source licences.

Motion Primitives/Progressive Blur

Feedback & loaders
1 of 2
Compiling

Theme it

Every preview, live

Brand colour

Corner radius

Font

Recolours shadcn’s tokens, Tailwind’s accent colours and colours set in the code. Red, amber and green classes stay, since they usually mean error, warning or success.

2 versions·2 libraries

  • Motion Primitives
  • Magic UI

Progressive Blur

A component that applies progressive blur effects to elements.

npx shadcn@latest add https://motion-primitives.com/c/progressive-blur.json
Open in v0 Docs Repo
Library
Motion Primitives
License
MIT
Stack
React · Tailwind CSS · animated
Packages
motion
Size
64 lines
Demo
Written by UIPin: the library doesn’t ship a usage example, so the preview uses one of ours (in the code below).

Code

progressive-blur.tsx

'use client';
import { cn } from '@/lib/utils';
import { HTMLMotionProps, motion } from 'motion/react';

export const GRADIENT_ANGLES = {
  top: 0,
  right: 90,
  bottom: 180,
  left: 270,
};

export type ProgressiveBlurProps = {
  direction?: keyof typeof GRADIENT_ANGLES;
  blurLayers?: number;
  className?: string;
  blurIntensity?: number;
} & HTMLMotionProps<'div'>;

export function ProgressiveBlur({
  direction = 'bottom',
  blurLayers = 8,
  className,
  blurIntensity = 0.25,
  ...props
}: ProgressiveBlurProps) {
  const layers = Math.max(blurLayers, 2);
  const segmentSize = 1 / (blurLayers + 1);

  return (
    <div className={cn('relative', className)}>
      {Array.from({ length: layers }).map((_, index) => {
        const angle = GRADIENT_ANGLES[direction];
        const gradientStops = [
          index * segmentSize,
          (index + 1) * segmentSize,
          (index + 2) * segmentSize,
          (index + 3) * segmentSize,
        ].map(
          (pos, posIndex) =>
            `rgba(255, 255, 255, ${posIndex === 1 || posIndex === 2 ? 1 : 0}) ${pos * 100}%`
        );

        const gradient = `linear-gradient(${angle}deg, ${gradientStops.join(
          ', '
        )})`;

        return (
          <motion.div
            key={index}
            className='pointer-events-none absolute inset-0 rounded-[inherit]'
            style={{
              maskImage: gradient,
              WebkitMaskImage: gradient,
              backdropFilter: `blur(${index * blurIntensity}px)`,
              WebkitBackdropFilter: `blur(${index * blurIntensity}px)`,
            }}
            {...props}
          />
        );
      })}
    </div>
  );
}

More like this

Focal Point Picker

Kokonut UI·Other

Morphing Dialog

Motion Primitives·Text effects

Depth Carousel

React Bits·Media & 3DMIT+

Target Cursor

React Bits·Cursor & effectsMIT+

Novatrix Background

Eldora UI·Backgrounds

Strands

React Bits·BackgroundsMIT+

Bubble Background

Animate UI·BackgroundsMIT+

Toolbar Expandable

Motion Primitives·Navigation

Aspect Ratio

shadcn/ui·Data display

Three D Carousel

Cult UI·Media & 3D

Menubar

shadcn/ui·Overlays

Pixel Swap

React Bits·Cursor & effectsMIT+

Drape Background

Kokonut UI·Backgrounds

Clip Trimmer

Kokonut UI·Backgrounds

Svg Ripple Effect

Eldora UI·Backgrounds