blaze-motion
← All components

Fade

Fade

One prop-driven fade — opacity plus an optional subtle drift (direction) and blur focus-in (blur), on inView or mount. Covers above-the-fold fades and scroll reveals alike.

direction="up" (default)
Fades in with a subtle rise.
direction="none"
Pure opacity — no drift.
blur direction="none"
Blur → sharp — no drift.
blur direction="up"
Blur + rise, together.

Installation

One command drops the source into your repo — editable, with the provider and motion pulled in automatically.

npx shadcn add https://motion.asmitsah.dev/r/fade.json

Usage

Basic

Wrap anything — it fades in with a subtle upward drift. Already-in-view elements animate immediately, so this covers both above-the-fold and on-scroll.

import { Fade } from "@/components/motion/fade";

<Fade className="grid gap-4">
  <h1>Fades in with a subtle rise.</h1>
</Fade>

Scroll reveal

The default trigger is inView (once) — so a Fade below the fold rises in the first time it scrolls into view. This is the migration path off the old Reveal.

<Fade direction="up" trigger="inView">
  <section>Rises into view, once.</section>
</Fade>

Pure opacity

direction="none" drops the drift for a straight opacity fade — the old FadeIn.

<Fade direction="none">
  <h1>Pure opacity, no rise.</h1>
</Fade>

Blur focus-in

blur layers a blur → sharp settle on top of the fade (GPU-costly `filter` — opt-in). Since direction defaults to "up", a bare `<Fade blur>` also rises — use direction="none" for a pure focus-in with no movement.

<Fade blur direction="none">
  <img src="/hero.jpg" alt="Product hero" />
</Fade>

<Fade blur direction="up">
  <h2>Blur + rise, together.</h2>
</Fade>

On mount + delay

trigger="mount" plays immediately regardless of viewport; delay offsets a sibling to sequence a hero without a full Stagger.

<Fade trigger="mount">
  <h1>Leads</h1>
</Fade>
<Fade trigger="mount" delay={0.15}>
  <p>Follows, a beat later.</p>
</Fade>

Props

PropTypeDefaultDescription
childrenReactNodeContent that fades in.
classNamestringPassed straight through — Fade becomes your layout element.
styleCSSPropertiesInline style passthrough.
delaynumber0Seconds before this instance animates.
direction"none" | "up" | "down" | "left" | "right""up"A fixed, subtle drift as it fades — "none" is pure opacity. Tunable travel is Slide's job.
blurboolean | numberfalseLayer a blur → sharp focus-in on top; true uses ~8px, a number sets custom px.
trigger"inView" | "mount""inView"Animate the first time it's in view (once), or immediately on mount.