Preset
slideDown
Starts above its resting position and settles down into place, animating the y transform and nothing else.
Transform only
Settles down into place.
The mirror of slideUp: the heading starts 16px high and drops to rest. Transform only, so the text is painted in the server HTML either way.
Usage
import { Section } from "@/lib/motion";
import { slideDown } from "@/lib/motion/presets/slide-down";
export function Features() {
return (
<Section {...slideDown} className="grid gap-6 md:grid-cols-3">
<FeatureCard title="Copy, do not install" />
<FeatureCard title="One file you own" />
<FeatureCard title="No wrappers" />
</Section>
);
}Installation
npx shadcn@latest add https://motion.asmitsah.dev/r/slide-down.jsonProps and tokens
What it sets
| Property | Initial | In view | Reduced motion | Reads from config.ts |
|---|---|---|---|---|
| y | -16 | 0 | Instant | -travel.sm → rest.y |
Transition and viewport
| Option | Value | Reads from config.ts |
|---|---|---|
| duration | 0.55 | duration.base |
| ease | [0.16,1,0.3,1] | ease |
| viewport.once | true | viewport |
| viewport.amount | "some" | viewport |
| viewport.margin | "0px 0px -12% 0px" | viewport |
Every motion prop the preset does not set — whileHover, whileTap, whileFocus — stays available at the call site. Write it after the spread and it wins.
layout and drag need the domMax feature bundle, not domAnimation — swap the lazy import in provider.tsx. It adds roughly 13kb gzipped on top of domAnimation.