Sortable list
Rows or cards a person puts in order by drag, keyboard or Move buttons, announcing each move.
Rows: the scenes of a chapter
Drag a row by its grip; or press Space on the grip, move it with the arrow keys and press Space to drop it (Escape puts it back); or use Move up and Move down. The page hears the new order and writes it below.
-
Low waterInes, 2,140 words
-
Tracks in the limestoneWade, 2,610 words
-
The ranger's notebookInes, 1,460 words
-
Night at the crossingWade, 980 words
To move an item with the keyboard, press Space or Enter on its handle, move it with the arrow keys, and press Space or Enter to drop it. Escape puts it back.
Cards: a corkboard, rendered by the React wrapper
One card per scene with its summary. In cards every arrow key means previous or next in reading order.
An item that is up, and one under the pointer
Set from the page: a raised item with an accent edge, its grip pressed.
-
Rain at Glen RoseUp by keyboard
-
The second setUnder the pointer
-
The flood lineGrip under the pointer
Lists that share a group: items move between them
Two lists with the same data-group. Drag a grip into the other list, press Space on a grip and an arrow past the end of its list, or choose the list in the item's select. Remove asks the page first (cap:sortable-remove); with data-alt-keys, Alt and an arrow anywhere in an item moves it too.
Talks
-
Getting started
-
Release notes
- Empty. Drag an abstract here.
Posters
-
Field notes
- Empty. Drag an abstract here.
To move an item with the keyboard, press Space or Enter on its handle, move it with the arrow keys, and press Space or Enter to drop it. Escape puts it back.
Repeatable rows in React: add, remove, put in order
Rows with fields of their own, kept by the page as a plain array; useRows gives each row an id that follows it, so what is typed in a row moves with it. Add puts focus in the new row's first field; Remove puts it on the next row; at three rows Add is off; at none the list says so.
A site's own rows: no grip, Up and Down in words, no box, a red Remove, an excluded row, the site's own checkbox
Props (grip={false}, steps="labeled", itemClassName, renderControls) and tokens (--sortable-item-border, --sortable-item-bg, --sortable-item-pad, --sortable-remove-ink) only.
Steps as cards: a head line, Alt and an arrow, the list's own words
The stack layout puts the grip, the head and the buttons over the content. Alt and Up or Down anywhere in a step moves it, and the list says "Moved to step 2 of 3." in its host's words.
Sections in React: items between lists, and locked
A board of three lists. Locking it (a published book) leaves the order with no grip and no buttons.
As delivered with no script: a form the server reorders
Move up and Move down are submit buttons (up=<id>, down=<id>), and every item posts its id as order, so Save order sends the whole list. The ends' buttons are disabled.
Rows in React, inside a form
The React wrapper with name="order": hidden fields and submit buttons, as a server renders it; with script the moves happen in place and the page saves the order.