Components
- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hooks
Installation#
pnpm dlx shadcn@latest add @shark/marquee
Anatomy#
Marquee ├── MarqueeContent └── MarqueeItem
Usage#
import { Marquee, MarqueeContent, MarqueeItem, } from "@/components/ui/marquee";
<Marquee> <MarqueeContent> <MarqueeItem /> <MarqueeItem /> <MarqueeItem /> </MarqueeContent> </Marquee>
Orientation#
Use the orientation prop to control the orientation of the marquee.
Horizontal#
Vertical#
Examples#
Pause on hover#
Use the pauseOnInteraction prop to pause the marquee on hover or focus.
Reverse#
Use the reverse prop to scroll in the opposite direction.
Auto fill#
Use the autoFill prop to automatically duplicate content to fill the container.
Spacing#
Use the spacing prop to control the gap between items.
Fade#
Use the showEdges prop to show or hide the gradient fade at the start and end of the marquee.
Custom speed#
Use the speed prop (pixels per second) to control scroll speed.
API Reference#
Marquee#
Root component. Manages the scrolling viewport and animation.
| Prop | Type | Default |
|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" |
speed | number | 50 |
spacing | string | "16px" |
showEdges | boolean | true |
autoFill | boolean | false |
pauseOnInteraction | boolean | false |
reverse | boolean | false |
className | string | - |
MarqueeContent#
Viewport wrapper. Wrap MarqueeItem children with this. Animates content horizontally.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | - |
MarqueeItem#
Single item in the scrolling marquee.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | - |
For a complete list of props, see the Ark UI documentation.