Reorder List
betaA short list of people or things you put in order by dragging liquid pills, or with Space and the arrow keys.
- Forms
- 1 file
- 2 npm packages
- Accessibility notes
- Animates with motion
pnpm dlx @dowel-ui/cli add reorder-listnpm packages installed: class-variance-authority, motion.
import { ReorderList } from "@/components/ui/reorder-list";Default
Gallery
Presence
Controlled
Localised
Custom Rows
Disabled
<ReorderList>
| Prop | Type | Default |
|---|---|---|
items (required) | ReorderListItem[] | — |
announcementsOverrides for the live-region messages (i18n). | Partial<ReorderListAnnouncements> | — |
cornerPill corner radius, 0–22 px. | number | 22 |
defaultValueInitial order (uncontrolled). Defaults to the order of | string[] | — |
disabled | boolean | false |
fill | "light" | "dark" | "light" |
giveSpring softness for rows settling, 0–100. | number | 50 |
instructionsDescribes the keyboard operation; referenced by every row's button. | string | "Press Space or Enter to pick up, the arrow keys to move, Space or Enter to drop, Escape to cancel." |
leanHow much the held pill skews and squashes with velocity, 0–100. | number | 18 |
onValueChangeCalled with the new order after a drop that changed it. | (value: string[]) => void | — |
renderItemReplaces the avatar and label inside a row. The label still names the button. | (item: ReorderListItem, state: { grabbed: boolean; index: number }) => ReactNode | — |
stroke1px inset hairline on each pill. | boolean | false |
valueOrder as item ids (controlled). | string[] | — |
Plus every attribute of <div> except defaultValue, children.
10/10
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — passes
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — passes
- No fixed widths — passes