For Tailwind CSS v3 docs, click here.

Testimonial Slider

A lightweight testimonial slider with image rotation, text transitions, and optional auto‑rotation.

API

Prop 名称类型默认值描述
testimonialsArray<{ img: string; quote: string; name: string; role: string }>[]Array of testimonial objects displayed by the slider.
autoRotatebooleantrueIf true, the slider advances automatically every duration seconds.
durationnumber5Interval in seconds between slides when auto‑rotation is enabled.

通过 CLI 安装

npm
pnpm
bun
yarn
npx shadcn-vue@latest add "https://registry.inspira-ui.com/spinning-text.json"

手动安装

You can 复制并粘贴以下代码: to create this component:

TestimonialSlider.vue

功能特性

  • Avatar & Quote Pairing — Images animate with a subtle rotation while quotes fade/slide in.
  • Auto‑Rotation — Enable continuous cycling with the autoRotate prop.
  • Height Fix Utility — Ensures the container height remains stable during transitions.
  • Manual Navigation — Prev / next arrow buttons for user control.
  • CSS‑Driven Animations — Uses Vue <transition-group> and custom CSS for smooth effects, no extra libraries required.
  • Fully Responsive — Adjusts gracefully across screen sizes.