Skip to content
Uxelith
Sign in
Prov1.0.0Data

Sortable List

Reorder by dragging, or entirely by keyboard: the row lifts and leans into fast moves, the others glide aside, it settles with an accent edge, and every move is announced.

Installs with Uxelith ProHow
Licence
Pro
Packages
3
Updated
10 Oct 2026
Live

Installation

Usage

example.tsx
"use client"

import { SortableList } from "@/components/sortable-list"

export function Priorities() {
  return (
    <SortableList
      label="Sprint priorities"
      numbered
      items={[
        { id: "auth", label: "Passkey sign-in" },
        { id: "billing", label: "Annual billing" },
        { id: "search", label: "Faster search" },
      ]}
      onReorder={(items) => console.log(items.map((item) => item.id))}
    />
  )
}

Props

PropTypeDefaultDescription
items{ id: string; label: string; description?: ReactNode }[]—The starting order. Change the list's key to reset it.
onReorder(items) => void—Called with the new order after a drop.
labelstring—Accessible name for the list.
numberedbooleanfalseShow each item's position.
renderItem(item, index) => ReactNode—Custom row content; the handle is added for you.
handlebooleantrueDrag by the handle, or false to drag the whole row (the handle stays for keyboard users).
--sortable-accentCSS variable--ringBorder of the item being moved.

Accessibility

  • Keyboard: focus a handle, Space or Enter to pick up, ↑/↓ (Home/End) to move, Space or Enter to drop, Escape to put it back.
  • Pick-ups, moves and drops are announced in a live region, e.g. "Annual billing, position 3 of 5".
  • Handles are labelled "Reorder <item>" and described with the instructions.
  • Rows move instantly under prefers-reduced-motion.
  • Keyboard moves are instant; dragging lifts and leans only without prefers-reduced-motion.

Changelog

  1. v1.0.0Latest

    First release.

More in Data

All 9 in Data
  • DataPro

    Area Chart

    Trends over time: lines draw themselves in, the crosshair glides between points, the area you've scrubbed stays bright, and the tooltip shows the change from the point before.

  • DataFree

    Avatar Stack

    Overlapping avatars that spread on hover, with a name tooltip that swings with the pointer, status dots and a +N list of everyone else. Photos or initials.

  • DataPro

    Bar Chart

    A responsive bar chart, grouped or stacked: bars rise in one after another, the hovered column lights up and the tooltip glides, with keyboard navigation and a hidden data table.