SortableList
moleculesReorderable list with a drag grip, arrow buttons and a full keyboard grab mode, announcing every move; rows can be locked, vetoed and selected.
Incident triage queue
onreorder hands back the new key order; locked keeps the incident in progress pinned and canMove stops anything landing above it; bind:selected opens a row.
- Cache cluster unreachable cache-01working
- Worker CPU saturated worker-02SEV2
- Slow transcodes for 4K uploads media-transcodeSEV3
- Gateway 502s from one region api-gatewaySEV2
- Replica lag over 30 s during backups postgres-primarySEV3
Sizes and handles
size="sm" | "md"; handle="row" drags from anywhere (touch long-presses 250 ms); arrows={false} and numbered toggle the chrome; as="ul" for unordered sets.
- Night Drive
- Paper Boats
- Static Bloom
- Lantern
- Night Drive Kaleido
- Paper Boats June Hollow
- Static Bloom Kaleido
- Lantern Oro Valley
States
An empty list renders nothing (pair it with an EmptyState); one row has disabled arrows; locked rows keep a spacer instead of a grip; long names truncate inside the row.
No steps yet
- Rotate API keys
- Freeze writes
- Snapshot volume
- Promote the replica in eu-west-1 and repoint every connection string in the vault
- Unfreeze writes
Optimistic order and custom announcements
The new order shows at once; if items is not updated within revertAfter ms (here a rejected save), the list snaps back. messages localises every live-region string.
- Europe (Frankfurt)
- United States (Virginia)
- Asia Pacific (Tokyo)
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items required | T[] | — | |
key required | (item: T) => string | — | |
row required | Snippet<[T, SortableListRowContext]> | — | Row content; the kit renders the grip, ordinal and arrows around it. |
trailing | Snippet<[T, SortableListRowContext]> | — | Interactive row extras (go, skip), kept outside the selectable body. |
onreorder | (keys: string[], move: SortableListMove) => void | — | Fires on drop or an arrow press with the full new key order. |
canMove | (key: string, to: number) => boolean | — | Veto a target index for a key. |
locked | (item: T) => boolean | — | A locked row has no grip and disabled arrows. |
name | (item: T) => string | — | Accessible row name used in labels and announcements. Defaults to the key. |
arrows | boolean | true | |
numbered | boolean | false | |
selected bindable | string | — | |
onselect | (key: string) => void | — | |
selectable | boolean | — | Render the row body as a select button. Defaults to on when `onselect` or `selected` is given. |
handle | 'grip' | 'row' | 'grip' | `row` drags from anywhere on the row; touch then needs a 250 ms long-press. |
size | 'sm' | 'md' | 'md' | |
label required | string | — | |
messages | Partial<SortableListMessages> | — | |
as | 'ol' | 'ul' | 'ol' | |
revertAfter | number | 3000 | Ms the optimistic order is kept when `items` is not updated. |
class | string | '' | |
style | string | — |