For Tailwind CSS v3 docs, click here.

滚动岛

A dynamic and interactive component that displays scroll progress with animated visuals and an expandable area for additional content.

通过 CLI 安装

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

手动安装

Install the dependencies

npm
pnpm
bun
yarn
npm install @number-flow/vue

复制并粘贴以下代码:

ScrollIsland.vue

API

Prop 名称类型默认值描述
classstring""Additional CSS classes for custom styling.
titlestring"Progress"Title displayed in the header of the component.
heightstring44Height of the component.

功能特性

  • Scroll Progress Tracking: Dynamically displays the scroll progress of the page as a percentage.
  • Expandable Layout: Transforms between a circular and a rectangular layout based on user interaction.
  • Animated Circular Progress Bar: Displays a visually appealing progress bar with smooth transitions.
  • Dynamic Content Slot: Supports additional content in the expandable section.
  • Dark Mode Support: Adapts to the dark or light mode of the user's system preferences.

感谢