Render the rows from the order that the list owns.
stage-order.tsx
SortableList
<ul>| Prop | Type | Default | Description |
|---|---|---|---|
| value | readonly string[] | — | The item ids in order (controlled). |
| default | readonly string[] | EMPTY_ORDER | The first order when the list owns it (uncontrolled). |
| on | — | Called once per finished move with the new order: at the drop of a drag (not on each step), and at once for a menu move. Not called for a cancel (Escape) or a drop in the same place. | |
| orientation | "grid""horizontal""vertical" | "vertical" | vertical (default) and horizontal lock the drag to their axis; grid moves freely. |
| variant | "card""plain" | "plain" | plain (default): rows with no edge. card: separate rows with an edge. |
| size | "default""lg""sm" | "default" | The row height: sm 32px, default 40px, lg 48px. |
| disabled | boolean | false | No item can be lifted or moved. |
| labels | — | The words of the list (the names, the menu, the key bar), merged over SORTABLE_LIST_LABELS. | |
| children | — | The items. With an uncontrolled list, render them from the order: (order) => …. | |
| driver | — | Drives a drag from code (DragDriver, an item id as the item): a staged scene, a tour, or a test lifts an item, carries it, and drops it through the same drag as a pointer, with the lift, the room the others make, and the drop flight. | |
| ...props | <ul> attributes | — | Every other attribute goes to the <ul>, with a ref. |
SortableListItem
<li>| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | — | The item id: one id of the list value. |
| label | string | id | The name on the handle and the Move menu. Default: the id. |
| disabled | boolean | false | The item cannot be lifted. Other items still move past it. |
| locked | boolean | false | The item cannot be lifted and holds its place: no item moves past it (a pinned row). The handle shows a lock in place of the grip. |
| ...props | <li> attributes | — | Every other attribute goes to the <li>, with a ref. |
SortableListHandle
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| locked | ReactNode | — | The mark of a locked item, in place of the grip. Default: a lock (pass a pin for a pinned row). | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
SortableListItemMoveMenu
| Prop | Type | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| children | ReactNode | — | The parts: a SortableListItemMoveMenuTrigger and a SortableListItemMoveMenuContent. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From Base UIMenu.RootBase UI docs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default | boolean | false | Whether the menu is initially open. To render a controlled menu, use the open prop instead. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| loop | boolean | true | Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| highlight | boolean | true | Whether moving the pointer over items should highlight them. Disabling this prop allows CSS :hover to be differentiated from the :focus (data-highlighted) state. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SortableListItemMoveMenuTrigger
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
SortableListItemMoveMenuContent
<div>| Prop | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| arrow | boolean | — | Show an arrow that points at the trigger. The gap grows from 4px to 8px. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backdrop | boolean | — | Put a clear layer under the popup (Base UI Menu.Backdrop), for example to dim it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| portal | — | Other Base UI props of the inner parts. A className here adds to the component classes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| positioner | — | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backdrop | PopupPartProps<MenuBackdropProps> | — | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| arrow | PopupPartProps<MenuArrowProps> | — | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| children | ReactNode | — | More items after the moves (Rename, Remove), below a separator. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From Base UIMenu.PopupBase UI docs | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| anchor | — | An element to position the popup against. By default, the popup will be positioned against the trigger. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| position | "absolute""fixed" | 'absolute' | Determines which CSS position property to use. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| side | number | OffsetFunction | 0 | Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a data object parameter with the following properties: - data.anchor: the dimensions of the anchor element with properties width and height. - data.positioner: the dimensions of the positioner element with properties width and height. - data.side: which side of the anchor element the positioner is aligned against. - data.align: how the positioner is aligned relative to the specified side. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Space | Lifts the focused item, and drops it. |
|---|---|
| Enter | Drops the lifted item. |
| Up ArroworDown ArroworLeft ArroworRight Arrow | Moves the lifted item. |
| Esc | Cancels the move. |
- KanbanPick Kanban when people move cards between columns, such as the stages of work.
- TreeLets people browse and pick items in a hierarchy, such as files, docs pages, or categories. Arrow keys open and close rows, and rows can move by drag.
- TableShows data in rows and columns with plain HTML table parts. Number columns line up, the head can stay at the top, and a wide table scrolls in its own box.
- Data ListShows the details of one record as label and value pairs, such as an order or a person. It stacks the pairs by itself in a narrow box.
Built with
Installs with Sortable List







