Blur Fade

Blur fade in and out animation.

Installation

pnpm dlx shadcn@latest add "https://vritti.thesatyajit.com/r/blur-fade"

Dependencies

pnpm add motion

Props

Blur Fade

PropTypeDefaultDescription
childrenReact.ReactNode-Content to animate
classNamestring-Additional CSS classes
variant{ hidden: { y: number }; visible: { y: number } }-Custom motion variants for hidden and visible states
durationnumber0.4Animation duration in seconds
delaynumber0Animation delay in seconds
offsetnumber6Distance offset for the slide animation in pixels
direction"up" | "down" | "left" | "right""down"Direction of the fade-in slide animation
inViewbooleanfalseWhether to trigger animation only when element is in view
inViewMarginMarginType"-50px"Margin for the in-view intersection observer
blurstring"6px"Amount of blur applied during the hidden state