Skip to content

    Browse components

    Reorder List

    A list you drag into a new order by its handles: the picked-up row lifts with a shadow while the others spring aside. Handles also move rows with the arrow keys, announced to screen readers.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/reorder-list

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/reorder-list.json

    Usage

    import { ReorderList } from "@/components/ui/reorder-list";
    
    <ReorderList items={tasks} onChange={setTasks} label="Priorities" />

    Props

    PropTypeDefaultDescription
    labelstring"Reorderable list"Accessible name of the list.
    itemsReactNode—Controlled order: { id, label, description?, leading? }[].
    defaultItemsReactNode—Initial order when uncontrolled.
    onChangeReactNode—(items) => void, called with the new order.
    classNamestring—Extra classes for the root element.