docs/components/marquee
Sections
Components
Utilities
Forms
Hooks
Copy Markdown
Scrolls items in a horizontal container.
PreviewCode
CLIManual
pnpmbunnpmyarn
pnpm dlx shadcn@latest add @shark/marquee
Marquee
├── MarqueeContent
└── MarqueeItem
import {
Marquee,
MarqueeContent,
MarqueeItem,
} from "@/components/ui/marquee";
<Marquee>
<MarqueeContent>
<MarqueeItem />
<MarqueeItem />
<MarqueeItem />
</MarqueeContent>
</Marquee>
Use the orientation prop to control the orientation of the marquee.
PreviewCode
PreviewCode
Use the pauseOnInteraction prop to pause the marquee on hover or focus.
PreviewCode
Use the reverse prop to scroll in the opposite direction.
PreviewCode
Use the autoFill prop to automatically duplicate content to fill the container.
PreviewCode
Use the spacing prop to control the gap between items.
PreviewCode
Use the showEdges prop to show or hide the gradient fade at the start and end of the marquee.
PreviewCode
Use the speed prop (pixels per second) to control scroll speed.
PreviewCode
Root component. Manages the scrolling viewport and animation.
| Prop | Type | Default |
|---|---|---|
orientation | `"horizontal" | "vertical"` |
speed | number | 50 |
spacing | string | "16px" |
showEdges | boolean | true |
autoFill | boolean | false |
pauseOnInteraction | boolean | false |
reverse | boolean | false |
className | string | - |
Viewport wrapper. Wrap MarqueeItem children with this. Animates content horizontally.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | - |
Single item in the scrolling marquee.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | - |
For a complete list of props, see the Ark UI documentation.
[
Previous page
Listbox ](/docs/components/listbox)[
Next page
Menu ](/docs/components/menu)
On This Page
InstallationAnatomyUsageOrientationHorizontalVerticalExamplesPause on hoverReverseAuto fillSpacingFadeCustom speedAPI ReferenceMarqueeMarqueeContentMarqueeItem