Skip to content
Menu

Animation

Directional Slide In

Directional Slide In: A reveal that pushes content in from any of the four sides by a set distance and lets a spring absorb the arrival.

Using Directional Slide In

Directional Slide In uses the card preview frame with a light/dark theme setting.

Customize the preview

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

ControlTypeDefaultPreview limits
directionselectupOptions: up, down, left, right
offsetnumber100From 8 to 300; step 4
delaynumber0From 0 to 1000; step 50
staggernumber100From 0 to 400; step 10
accentcolor#FF4D8DNo additional limit in the metadata.
Which frameworks are available for Directional Slide In?

Directional Slide In is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.

What does Directional Slide In depend on?

The React metadata lists these npm dependencies beyond React: motion.

What accessibility details are visible in Directional Slide In?

The React source for Directional Slide In includes: The source scan found no explicit native form/navigation elements, ARIA attributes or keyboard handlers in index.tsx. These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

How does Directional Slide In handle reduced motion?

Directional Slide In reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: reduced ? REST : (trigger === "view" && !revealed) ? away : REST; reduced ? { duration: 0 } : { ...SPRING, delay: delay / 1000 }; reduced || shouldReveal ? REST : away. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.

Connect your agent

Related open components