TidalUI

Sortable list preview

Reorder one consumer-owned list with explicit native move actions and accepted-state feedback.

pro · Essentials · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/sortable-list

Import components/ui/tidal.css, components/ui/sortable-list.css. Wrap installed components in tidal-scope.

Preview

Sortable list component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/sortable-list.css";
import{TidalSortableList}from"./components/ui/sortable-list";
export default()=><div className="tidal-scope"><TidalSortableList items={[{id:"example",label:"Demo"}]} label={"Demo"} onOrderChange={() => {}}/></div>;

API and props

TidalSortableList.items (required)
ReadonlyArray<TidalSortableListItem>

Required items value accepted by this exported component.

TidalSortableList.label (required)
string

Required label value accepted by this exported component.

TidalSortableList.onOrderChange (required)
(nextItems: TidalSortableListItem[], move: TidalSortMove, event: MouseEvent<HTMLButtonElement>) => void

Callback invoked when the order change interaction is proposed.

TidalSortableList.announceMoves
boolean | undefined

Optional announce moves value accepted by this exported component.

TidalSortableList.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalSortableList.emptyMessage
ReactNode

Optional empty message value accepted by this exported component.

TidalSortableList.moveAnnouncement
((item: TidalSortableListItem, fromIndex: number, toIndex: number, total: number) => string) | undefined

Optional move announcement value accepted by this exported component.

TidalSortableList.moveDownLabel
((item: TidalSortableListItem, index: number) => string) | undefined

Optional move down label value accepted by this exported component.

TidalSortableList.moveUpLabel
((item: TidalSortableListItem, index: number) => string) | undefined

Optional move up label value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas