Components

Blur Fade

A blur fade-in animation for React and Tailwind CSS: content eases in from a soft blur and a small offset as it scrolls into view, with a group helper that staggers lists and grids. The server renders everything visible, so it stays SEO-friendly and never flashes content that is already on screen.

  • Scroll-triggered
  • Stagger groups
  • SSR-safe, no flash
  • Four directions
  • prefers-reduced-motion
Changelog

Release notes your team will read

Draft updates from merged pull requests, review them together and publish to your site in one step.

Press replay to watch it again

Installation

$ npx shadcn@latest add https://duskui.com/r/blur-fade.json

Usage

features.tsx
import { BlurFade, BlurFadeGroup } from "@/components/dusk/blur-fade/blur-fade"

export function Features() {
  return (
    <section>
      <BlurFade as="h2" className="text-3xl font-semibold">
        Built for speed
      </BlurFade>
      <BlurFadeGroup as="ul" stagger={0.08} className="grid gap-4 sm:grid-cols-3">
        <FeatureCard title="Edge rendering" />
        <FeatureCard title="Instant previews" />
        <FeatureCard title="Zero config" />
      </BlurFadeGroup>
    </section>
  )
}

Examples

Directions

direction is where the content travels to: up rises into place, none only fades and un-blurs. Tune the distance with offset and the softness with blur.

"up"
"down"
"left"
"right"
"none"

Scroll gallery

Each tile animates as it enters its scroll container. With once={false} tiles hide again when they leave and replay on the way back.

Scroll down. Tiles replay every time they enter.

#01
#02
#03
#04
#05
#06
#07
#08
#09
#10
#11
#12
#13
#14
#15
#16
#17
#18

Staggered group

BlurFadeGroup watches the viewport once for all its children and offsets each by stagger seconds. With as="ul" every child is wrapped in an li; style the wrappers with itemClassName.

  • Server-rendered and visible without JavaScript
  • No flash for content already on screen at load
  • One observer for the whole group
  • Blur removed when done, so fixed children still work
  • Instant under prefers-reduced-motion

API Reference

BlurFade also accepts any HTML attribute for the rendered element. BlurFadeGroup takes direction, offset, blur, duration, trigger, inViewMargin, amount and once for all its children, plus the props marked “Group”.

PropTypeDefaultDescription
as"div" | "span" | "section" | "article" | "li" | "p" | …"div"Element to render. Group: "div" | "ul" | "ol" | "section".
direction"up" | "down" | "left" | "right" | "none""up"Where the content travels to as it appears.
offsetnumber8Travel distance in px.
blurnumber6Starting blur in px.
delaynumber0Seconds before the entrance (group: before the first child).
durationnumber0.5Seconds the entrance takes.
trigger"inView" | "mount""inView"Play when scrolled into view, or as soon as it mounts.
inViewMarginstring"-40px"IntersectionObserver root margin. Negative values wait until the element is further inside.
amountnumber0Share of the element (0–1) that must be visible to start.
oncebooleantruePlay only the first time; false hides on leave and replays on every entry.
staggernumber0.08Group: seconds between consecutive children.
itemAsBlurFade as"li" in lists, else "div"Group: element wrapped around each child.
itemClassNamestring—Group: class name for every item wrapper.

Accessibility

  • Content is rendered visible in the server HTML, so crawlers, no-JS visitors and assistive technology always get it.
  • While hydrating, anything already on screen keeps its painted state; only content below the fold (or mounted later on the client) is hidden, before it is ever seen.
  • Only opacity, transform and filter change, so layout never shifts. The blur and transform are removed afterwards and never trap position: fixed children.
  • With prefers-reduced-motion the content appears immediately.
  • Use as to keep correct semantics, e.g. as="ul" on a group renders a real list.