Sortable list

Reorders items with drag handles, move buttons, and keyboard shortcuts.

Use move buttons, or focus an item handle and press Alt with Arrow up or Arrow down.
  1. Research
  2. Design
  3. Build
Use move buttons, or focus an item handle and press Alt with Arrow up or Arrow down.
  1. Research
  2. Design
  3. Build

Use it for

  • Ordering tasks, workflow steps, and priority lists.

Not for

  • Cross-column status changes alone; use KanbanBoard.

Three ways in. They share one source, so the pixels match whichever you pick.

1. Import the package

npm install @noorddev/vlak-react

// once, next to your app's root
import "@noorddev/vlak-react/css";

import { SortableList } from "@noorddev/vlak-react";

Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/sortable-list.

2. Vendor the source

npx @noorddev/vlak-cli add sortable-list

The StyleX leaf lands in components/vlak/ with its dependencies, for your own compiler to own. See StyleX.

3. Through shadcn

npx shadcn add https://vlak.dev/r/sortable-list.json

The same registry item, installed by shadcn's CLI.

CSS only

<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />

No React. Link vlak.css and use the markup and classes below.

import { SortableList } from "@noorddev/vlak-react";

<SortableList defaultValue={[{ id: "research", label: "Research" }, { id: "design", label: "Design" }, { id: "build", label: "Build" }]} />

SortableList

Reordering through drag, named move buttons, or Alt and the arrow keys.

PropTypeDefaultDescription
valueSortableItem[]
defaultValueSortableItem[][]
onValueChange(items: SortableItem[]) => void
labelstring"Reorder items"

Also accepts Omit<HTMLAttributes<HTMLOListElement>, "defaultValue">.

KeysDoes
Tab, Enter, Space, Alt+Arrow up/downMove buttons work with Enter/Space; Alt with Up/Down on a handle changes its position.
<ol class="rs-sortable-list" aria-label="Reorder items"><li class="rs-sortable-list-item"><div class="rs-sortable-list-content">Research</div><div class="rs-sortable-list-actions"><button class="rs-btn-ghost" aria-label="Move Research down">Move down</button></div></li></ol>
.rs-sortable-list.rs-sortable-list-item.rs-sortable-list-content.rs-sortable-list-actions.rs-sortable-list-status