Components
← All components

Sortable

stimeo--sortable

Single-list reorder that is genuinely keyboard- and screen-reader-accessible.

  • Core

The stimeo--sortable controller is the accessible drag-and-drop reorder — the flagship consumer of the pointer-drag primitive. The composition is markup-level: pointer-drag on every item emits the normalized drag signal with its built-in keyboard alternative, roving on the list keeps the handles a single Tab stop, and sortable interprets the signal. With a pointer, the item live-moves whenever the pointer crosses a sibling's midpoint. With the keyboard, Space grabs, each arrow press moves the item one position, Space drops, and Escape restores the pickup position — every step announced through the status live region ("Grabbed Card A, position 2 of 5"), localizable via data-* templates. A drop that changed the position dispatches reorder with { item, from, to } (zero-based) — the hook a real app uses to persist the order (and a Turbo Stream broadcast makes it collaborative). The real DOM nodes move, so the visual order never diverges from the reading order. Multi-list boards, nested trees, edge auto-scroll, and virtualized lists are outside this free single-list scope.

running

Drag a row by its handle, or focus a handle (Tab, then arrows) and press Space, move with ArrowUp/ArrowDown, Space to drop — Esc cancels.

  • Write the release notes
  • Fix the login redirect
  • Review the design draft
  • Update the dependencies

Keyboard

KeyAction
Space / Enter Grab the focused handle's item, or drop it (dispatching reorder if the position changed).
↑ / ↓ While grabbed, move the item one position (vertical orientation; clamped at the ends).
Esc Cancel — the item returns to its pickup position.