Animated Testimonials

import { AnimatedTestimonials } from '@hanzo/ui'

Default

Three quotes take turns every 5 seconds, each fading up into place, or jump to one by its dot.

This product has completely transformed how our team collaborates. The interface is intuitive and the features are exactly what we needed.

SA
Sarah Chen

Product Manager, TechCorp

export function Default() {
return (
<YStack maxW={480} width="100%">
<AnimatedTestimonials testimonials={quotes} />
</YStack>
)
}

Paused

`autoPlay={false}` holds on the first quote until a dot is clicked.

This product has completely transformed how our team collaborates. The interface is intuitive and the features are exactly what we needed.

SA
Sarah Chen

Product Manager, TechCorp

export function Paused() {
return (
<YStack maxW={480} width="100%">
<AnimatedTestimonials testimonials={quotes} autoPlay={false} />
</YStack>
)
}

Fast

A short `duration` advances every 1.5 seconds, for a busy marketing strip.

This product has completely transformed how our team collaborates. The interface is intuitive and the features are exactly what we needed.

SA
Sarah Chen

Product Manager, TechCorp

export function Fast() {
return (
<YStack maxW={480} width="100%">
<AnimatedTestimonials testimonials={quotes} duration={1500} />
</YStack>
)
}

No role

An author with neither role nor company skips the meta line entirely.

Just works, out of the box.

J.
J. Rivera
export function AuthorOnly() {
const anonymous: Testimonial[] = [
{ id: "1", content: "Just works, out of the box.", author: "J. Rivera" },
]
return (
<YStack maxW={480} width="100%">
<AnimatedTestimonials testimonials={anonymous} autoPlay={false} />
</YStack>
)
}

Types

export type Testimonial = {
id: string
content: string
author: string
role?: string
company?: string
avatar?: string
}
export type AnimatedTestimonialsProps = Omit<React.ComponentProps<typeof Frame>, 'children'> & {
testimonials: Testimonial[]
/** Advance on its own. Default true. */
autoPlay?: boolean
/** Milliseconds between slides. Default 5000. */
duration?: number
}

Exports

AnimatedTestimonialstype AnimatedTestimonialsPropstype Testimonial