For Tailwind CSS v3 docs, click here.

Timeline

A visually appealing and interactive timeline component with smooth animations, sticky labels, and a gradient scrolling effect.

API

Prop 名称类型默认值描述
containerClassstring""Additional CSS classes for the timeline container.
classstring""Additional CSS classes for styling.
items{ id: string; label: string; }[][]List of timeline items, each with an ID and label.
titlestring""Title of the timeline section.
descriptionstring""Description text displayed below the title.

通过 CLI 安装

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

手动安装

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

Timeline.vue

功能特性

  • Animated Scroll Effect: The timeline bar animates smoothly as the user scrolls.
  • Sticky Labels: Each event label remains visible while scrolling.
  • Gradient Progress Bar: A visually appealing timeline indicator with gradient effects.
  • Slot Support: Custom content can be placed within each timeline item.
  • Responsive Design: Adapts seamlessly to different screen sizes.
  • Dark Mode Support: Automatically adjusts to light or dark themes.

感谢