For Tailwind CSS v3 docs, click here.

Container Text Flip

A container that flips through words, animating the width.

通过 CLI 安装

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

手动安装

复制并粘贴以下代码:

ContainerTextFlip.vue

Example

Standard

Hero section with animation

API

Prop 名称类型默认值描述
wordsstring[]["better", "modern", "beautiful", "awesome"]Array of words to cycle through in the animation
intervalnumber3000Time in milliseconds between word transitions
animationDurationnumber700Duration of the transition animation in milliseconds
classstring``Additional CSS classes to apply to the container
textClassstring``Additional CSS classes to apply to the text

感谢