Auto Scroll Showcase
A component that auto scrolls a page with a customizable speed and pause on user input.
Default
A component that auto scrolls a page with a customizable speed and pause on user input.
examples.tsx
1import { AutoScrollShowcase } from "@/registry/ui/auto-scroll-showcase";23export function AutoScrollShowcaseExample() {4 return (5 <>6 <div className="min-h-dvh"></div>7 <AutoScrollShowcase />8 </>9 );10}
Installation & source
Install via the shadcn CLI or copy the registry files manually.
bash
npx shadcn@latest add @tt-ui/auto-scroll-showcase
Props
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | NODE_ENV !== 'production' | Whether the auto scroll showcase is enabled. Defaults to true in development and false in production. |
| defaultSpeed | number | 55 (pixels per second) | The default speed of the auto scroll showcase. Defaults to 55 pixels per second. |
| pauseOnUserInput | boolean | true | Whether the auto scroll showcase pauses on user input. Defaults to true. |
| className | string | undefined | Classes for the auto scroll showcase. Defaults to undefined. |