blaze-motion
← All components

Slide

Slide

Directional slide — content slides in from a chosen direction and distance tier, with fade.

direction="up"
up
direction="down"
down
direction="left"
left
direction="right"
right
direction="up-left"
up-left
direction="up-right"
up-right
direction="down-left"
down-left
direction="down-right"
down-right

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/slide.json

Usage

Direction

Pick any of the 8 travel directions — diagonals move on both axes.

import { Slide } from "@/components/motion/slide";

<Slide direction="left">
  <Card />
</Slide>

Distance tier

tight (8px) · base (28px) · hero (64px) — or pass an explicit number.

<Slide direction="up" distance="hero">
  <h1>Big entrance</h1>
</Slide>

<Slide direction="right" distance={120}>
  <aside>Custom travel</aside>
</Slide>

Trigger on mount

Play immediately instead of waiting for scroll — for above-the-fold content.

<Slide direction="up" trigger="mount">
  <Hero />
</Slide>

Props

PropTypeDefaultDescription
childrenReactNodeContent that slides + fades in.
direction"up" | "down" | "left" | "right" | "up-left" | "up-right" | "down-left" | "down-right"One of 8 travel directions the content enters from. Required.
distance"tight" | "base" | "hero" | number"base"Travel distance — a tier (8 / 28 / 64px) or an explicit px value.
trigger"inView" | "mount""inView"Animate on scroll-into-view (once) or immediately on mount.
classNamestringPassed straight through — Slide becomes your layout element.
styleCSSPropertiesInline style passthrough.
delaynumber0Seconds before this instance animates.