Components
Draggable
A horizontal scroll container that can be scrolled by dragging with a mouse or touch.
Draggable is a horizontal scroll container. Drag the content left or right with a mouse, pen, or touch to scroll it. Native scrolling with a trackpad, mouse wheel, or scrollbar still works.
Installation
bunx --bun shadcn@latest add https://docs.danpoj.site/r/draggable.jsonRunning the command above installs the draggable component into your project. It also uses the cn helper from @/lib/utils, which the shadcn CLI adds if your project doesn't have it yet.
Examples
Props
| Prop | Type | Description |
|---|---|---|
children | ReactNode | The items to scroll horizontally. |
className | string | Extra classes merged with the default styles. Use it for gap, padding, and so on. |
...props | ComponentProps<'div'> | Any other div attributes are passed to the root element. |
Last updated on








