Logo

Animated Blurry Testimonials

A React component that’s smooth and sweet, showing testimonials that can’t be beat. With blurry transitions, sleek and clear, it auto-cycles through each cheer. Click the avatars or tap those arrows, motion magic keeps it smooth and narrow.



Was suspicious of Daddy. Now my boss respects me, my ex is jealous, and strangers nod at me. Thanks, Daddy


Installation



Understanding the Component


The AnimatedBlurTestimonials component displays a list of testimonials with animated transitions. Here’s how it works:

Automatic Cycling

The component uses an interval (set to a default delay of 8 seconds) to cycle through testimonials. Each cycle increases the testimonial index and resets the direction to forward.

Animation Effects

It uses the Motion library to animate testimonial text. The animation includes a horizontal translation, a blur effect, and opacity changes. The ani configuration defines three animation states:

  • initial - Testimonial starts offset and blurred.
  • animate - Testimonial transitions into view (zero offset and blur, full opacity).
  • exit - Testimonial exits with an offset in the opposite direction, blurring out.

Responsive Height

A ResizeObserver tracks the height of the testimonial content, ensuring the container resizes dynamically to fit the content.

Props

PropTypeDefaultDescription
dataTestimonialInterface[]noneArray containing testimonial details.
lightbooleannoneOptional; toggles between light/dark themes.
delayDurationnumber8Time interval (in seconds) between auto rotations.
_durationnumber0.4Duration of animation transitions.

TestimonialInterface (exported)

PropTypeDefaultDescription
messageReact.ReactNodenoneTestimonial message content.
avatar{src?: string; fallback?: string}noneAvatar image URL or fallback text.

AProps (exported)

PropTypeDefaultDescription
srcstringnoneURL of the avatar image.
fallbackstringnoneText displayed if no image URL.

Animated Testimonials

K