# Reordering

A list ordered by hand: a drag handle and a pair of move buttons on every row, the app's rules for where a row may go, and one move handed over each time; and a board, whose cards move between its columns.

API [Reorder](/ui/storybook/?path=/docs/ui-reorder--docs) [Board](/ui/storybook/?path=/docs/ui-board--docs) [List](/ui/storybook/?path=/docs/ui-primitives-list--docs) [Table](/ui/storybook/?path=/docs/ui-primitives-table--docs)

**Every row of a list ordered by hand has a drag handle and a pair of move buttons. Neither one replaces the other.**

```tsx
import { Button } from "@orz/ui/components/button";
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuItem,
  DropdownMenuTrigger,
} from "@orz/ui/components/dropdown-menu";
import { List, ListItem } from "@orz/ui/components/list";
import {
  moveItem,
  Reorder,
  ReorderButtons,
  ReorderHandle,
  ReorderItem,
} from "@orz/ui/components/reorder";
import { EllipsisIcon } from "lucide-react";
import { useState } from "react";

const CHANNELS = [
  { id: "push", name: "Push to phone", detail: "2 devices" },
  { id: "email", name: "Email", detail: "alice@example.com" },
  { id: "chat", name: "Chat webhook", detail: "hooks.example" },
  { id: "sms", name: "SMS", detail: "+1 555 0100" },
  { id: "desktop", name: "Desktop notification", detail: "This browser" },
];

export function NotificationChannels() {
  const [channels, setChannels] = useState(CHANNELS);
  return (
    <List purpose="collection" framed className="max-w-lg">
      <Reorder
        items={channels.map((c) => c.id)}
        onMove={(move) => setChannels((cs) => moveItem(cs, move))}
        asChild
      >
        <ul>
          {channels.map((channel) => (
            <ListItem key={channel.id} asChild>
              <ReorderItem id={channel.id} name={channel.name} asChild>
                <li className="flex min-h-row items-center gap-2 pr-1">
                  <ReorderHandle />
                  <span className="flex min-w-0 flex-1 items-baseline gap-2">
                    <span className="truncate">{channel.name}</span>
                    <span className="truncate text-ui-sm text-muted-foreground">
                      {channel.detail}
                    </span>
                  </span>
                  <ReorderButtons />
                  <DropdownMenu>
                    <DropdownMenuTrigger asChild>
                      <Button
                        variant="ghost"
                        size="icon-xs"
                        aria-label={`More actions for ${channel.name}`}
                      >
                        <EllipsisIcon />
                      </Button>
                    </DropdownMenuTrigger>
                    <DropdownMenuContent align="end">
                      <DropdownMenuItem>Edit…</DropdownMenuItem>
                      <DropdownMenuItem variant="destructive">
                        Remove
                      </DropdownMenuItem>
                    </DropdownMenuContent>
                  </DropdownMenu>
                </li>
              </ReorderItem>
            </ListItem>
          ))}
        </ul>
      </Reorder>
    </List>
  );
}
```

Where a notification goes, tried from the top. Drag a row by its grip, or press its ↑ or ↓; with the focus anywhere in a row, Alt+↑ and Alt+↓ (⌥ on a Mac) do what its buttons do. The other rows make room while one is dragged, and slide to their new places after a press.

## When to order by hand

Give a list a hand-set order when the order means something only its owner knows: what to try first, which rule matches before which, which way a fallback runs. A list that follows a field, a date or a name, is sorted by that field, and its rows carry no handle.

## The handle and the buttons

The handle is for the pointer: it carries a row any distance in one gesture. The buttons are for everyone else: the keyboard, a screen reader, a phone held in one hand, and anyone moving a row by a place or two. Each button's tooltip names its key, so the keyboard shortcut is found where the action already is.

**Do**

Give every row both: the grip at its start, the pair at its end.

**Don't**

Leave the buttons out. A drag is the only way to move these rows, which a keyboard, a screen reader and an unsteady hand cannot make ([WCAG 2.5.7](https://www.w3.org/WAI/WCAG22/Understanding/dragging-movements.html)).

Do not repeat the buttons as **Move up** and **Move down** in the row's `⋯` menu: they are already on the row. Where a row has a menu of its own, the pair goes just before it. A row that is a link keeps the handle and the buttons beside the link, never inside it.

## Where a row may go

```tsx
import {
  moveItem,
  Reorder,
  ReorderButtons,
  ReorderHandle,
  ReorderItem,
} from "@orz/ui/components/reorder";
import {
  Table,
  TableBody,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@orz/ui/components/table";
import { useState } from "react";

const ROUTES = [
  { match: "/api/*", upstream: "api-pool", rule: "Rate limit 100/min" },
  { match: "/static/*", upstream: "cdn", rule: "Cache 1 day" },
  { match: "/admin/*", upstream: "admin", rule: "Sign-in required" },
  { match: "/docs/*", upstream: "docs.example", rule: "Redirect" },
  { match: "/*", upstream: "web", rule: "Everything else" },
];

export function RouteTable() {
  const [routes, setRoutes] = useState(ROUTES);
  return (
    <Table>
      <TableHeader>
        <TableRow>
          <TableHead className="w-0 p-0" />
          <TableHead>Match</TableHead>
          <TableHead>Upstream</TableHead>
          <TableHead>Rule</TableHead>
          <TableHead className="w-0">
            <span className="sr-only">Order</span>
          </TableHead>
        </TableRow>
      </TableHeader>
      <Reorder
        items={routes.map((r) => r.match)}
        onMove={(move) => setRoutes((rs) => moveItem(rs, move))}
        // The catch-all stays last: it never moves, and nothing goes below it.
        canMove={(id) => id !== "/*"}
        canDrop={(_, to) => to.index < routes.length - 1}
        asChild
      >
        <TableBody>
          {routes.map((route) => (
            <ReorderItem
              key={route.match}
              id={route.match}
              name={route.match}
              asChild
            >
              <TableRow>
                <TableCell className="w-0 p-0">
                  <ReorderHandle />
                </TableCell>
                <TableCell className="font-mono">{route.match}</TableCell>
                <TableCell className="font-mono">{route.upstream}</TableCell>
                <TableCell>{route.rule}</TableCell>
                <TableCell className="w-0">
                  <ReorderButtons />
                </TableCell>
              </TableRow>
            </ReorderItem>
          ))}
        </TableBody>
      </Reorder>
    </Table>
  );
}
```

Routes, matched from the top. The catch-all must stay last: it never moves, and no route may go below it.

- A row that cannot move stays in the list, its handle and buttons disabled: `canMove`.
- A place that cannot take a row is refused before the drop, not undone after it: `canDrop`. A drag then holds the gap at the nearest place that takes the row, and a button steps past the refused places to the next one that does, or is disabled when there is none.
- When the rules are costly to ask or the list is long, answer for the buttons at once with `canMoveUp` and `canMoveDown`, rather than leaving `Reorder` to ask `canDrop` place by place.

`onMove` hears one move for each drag and each press: the row, where it was and where it went. An app that keeps positions on a server sends that one change; one that keeps an array passes it to `moveItem`, or `moveInGroups` for groups. `Reorder` changes nothing itself.

## Groups

```tsx
import { List, ListItem, ListLabel } from "@orz/ui/components/list";
import {
  moveInGroups,
  Reorder,
  ReorderButtons,
  ReorderGroup,
  ReorderHandle,
  ReorderItem,
} from "@orz/ui/components/reorder";
import { useState } from "react";

const NAMES: Record<string, string> = {
  push: "Push to phone",
  email: "Email",
  chat: "Chat webhook",
  sms: "SMS",
  desktop: "Desktop notification",
};

const TIERS = [
  { id: "first", name: "Notify first", items: ["push", "email"] },
  {
    id: "fallback",
    name: "If nobody answers",
    items: ["chat", "sms", "desktop"],
  },
  { id: "paused", name: "Paused", items: [] as string[] },
];

export function ChannelTiers() {
  const [tiers, setTiers] = useState(TIERS);
  return (
    <List purpose="collection" framed className="max-w-lg">
      <Reorder
        groups={tiers}
        onMove={(move) => setTiers((ts) => moveInGroups(ts, move))}
        // "Notify first" takes at most two channels.
        canDrop={(id, to) =>
          to.group !== "first" ||
          tiers[0].items.filter((i) => i !== id).length < 2
        }
      >
        {tiers.map((tier) => (
          <ReorderGroup key={tier.id} id={tier.id} name={tier.name} asChild>
            <section>
              <ListLabel asChild>
                <h3 className="px-2.5 pt-2 pb-1">{tier.name}</h3>
              </ListLabel>
              {tier.items.length === 0 && (
                <p className="px-2.5 pb-2 text-ui-sm text-muted-foreground">
                  No channels
                </p>
              )}
              <ul>
                {tier.items.map((id) => (
                  <ListItem key={id} asChild>
                    <ReorderItem id={id} name={NAMES[id]} asChild>
                      <li className="flex min-h-row items-center gap-2 pr-1">
                        <ReorderHandle />
                        <span className="min-w-0 flex-1 truncate">
                          {NAMES[id]}
                        </span>
                        <ReorderButtons />
                      </li>
                    </ReorderItem>
                  </ListItem>
                ))}
              </ul>
            </section>
          </ReorderGroup>
        ))}
      </Reorder>
    </List>
  );
}
```

When the group a row is in is part of its order, as which channels are tried first, put every group in one `Reorder` with `groups`, each group a `ReorderGroup` holding its heading and its rows. A row then moves across: a drag carries it past a heading, and a button at a group's end steps into the next group. Here **Notify first** takes at most two channels. An empty group shows a line saying so, which a row dragged into it covers.

When the group is something else about the row, its owner or its state, give each group a `Reorder` of its own: a row moves only within its group, and changing the group is an edit of the row, from its menu or its form.

## Boards

```tsx
import { Badge } from "@orz/ui/components/badge";
import {
  Board,
  BoardCard,
  BoardCardActions,
  BoardCardLink,
  BoardCardSelect,
  BoardCards,
  BoardColumn,
  BoardColumnCount,
  BoardColumnEmpty,
  BoardColumnHeader,
  BoardColumnTitle,
  moveCards,
} from "@orz/ui/components/board";
import { Button } from "@orz/ui/components/button";
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuLabel,
  DropdownMenuRadioGroup,
  DropdownMenuRadioItem,
  DropdownMenuTrigger,
} from "@orz/ui/components/dropdown-menu";
import { Pane } from "@orz/ui/components/pane";
import { EllipsisIcon } from "lucide-react";
import { useState } from "react";

const PULLS: Record<string, { title: string; label: string }> = {
  "81": { title: "Retry a failed fetch once", label: "bug" },
  "79": { title: "Fold diacritics in the filter menu", label: "feature" },
  "77": { title: "Smaller font files", label: "perf" },
  "74": { title: "Keyboard help for the demos", label: "docs" },
  "70": { title: "Undo after closing a task", label: "feature" },
};
const STAGES: Record<string, string> = {
  draft: "Draft",
  review: "In review",
  merging: "Merging",
};

export function ReviewBoard() {
  const [columns, setColumns] = useState([
    { id: "draft", items: ["81", "79"] },
    { id: "review", items: ["77", "74", "70"] },
    { id: "merging", items: [] as string[] },
  ]);
  const [selected, setSelected] = useState<string[]>([]);
  const move = (ids: string[], to: { column: string; index: number }) =>
    setColumns((now) => moveCards(now, ids, to));
  return (
    <Pane purpose="app" className="flex h-96 overflow-hidden">
      <Pane purpose="panel" className="flex min-w-0 flex-1 flex-col">
        <Board
          aria-label="Pull requests"
          className="flex-1"
          columns={columns}
          selected={selected}
          onSelectedChange={setSelected}
          onMove={({ ids, to }) => move(ids, to)}
        >
          {columns.map((column) => (
            <BoardColumn key={column.id} id={column.id}>
              <BoardColumnHeader>
                <BoardColumnTitle>{STAGES[column.id]}</BoardColumnTitle>
                <BoardColumnCount>{column.items.length}</BoardColumnCount>
              </BoardColumnHeader>
              <BoardCards>
                {column.items.length === 0 && (
                  <BoardColumnEmpty>Nothing here</BoardColumnEmpty>
                )}
                {column.items.map((id) => (
                  <BoardCard key={id} id={id} name={`#${id}`}>
                    <div className="flex items-start gap-2">
                      <BoardCardLink href={`#pull-${id}`} className="flex-1">
                        {PULLS[id]?.title}
                      </BoardCardLink>
                      <BoardCardSelect id={id} className="mt-0.5" />
                    </div>
                    <div className="flex items-center gap-2 text-muted-foreground text-ui-sm">
                      <span className="font-mono">#{id}</span>
                      <Badge variant="dot">{PULLS[id]?.label}</Badge>
                      <BoardCardActions className="-my-1 ml-auto">
                        <DropdownMenu>
                          <DropdownMenuTrigger asChild>
                            <Button
                              variant="ghost"
                              size="icon-sm"
                              aria-label={`Actions for #${id}`}
                            >
                              <EllipsisIcon />
                            </Button>
                          </DropdownMenuTrigger>
                          <DropdownMenuContent align="end" className="w-44">
                            <DropdownMenuLabel>Move to</DropdownMenuLabel>
                            <DropdownMenuRadioGroup
                              value={column.id}
                              onValueChange={(stage) => {
                                if (stage === column.id) return;
                                move([id], { column: stage, index: 0 });
                              }}
                            >
                              {Object.entries(STAGES).map(([stage, name]) => (
                                <DropdownMenuRadioItem
                                  key={stage}
                                  value={stage}
                                >
                                  {name}
                                </DropdownMenuRadioItem>
                              ))}
                            </DropdownMenuRadioGroup>
                          </DropdownMenuContent>
                        </DropdownMenu>
                      </BoardCardActions>
                    </div>
                  </BoardCard>
                ))}
              </BoardCards>
            </BoardColumn>
          ))}
        </Board>
      </Pane>
    </Pane>
  );
}
```

When the group a thing is in is the stage it moves through, a review's or a task's status, and the reader works across the stages at once, lay them side by side as a `Board`: a `BoardColumn` for each stage, its cards in `BoardCards`, each card a `BoardCard`. The board fills a pane. Its columns are lanes sunk through the pane to the page's ground, and its cards stand in them as modules stand on the ground ([Surfaces](/ui/guidelines/foundations/surfaces/index.md#boards)). A handful of columns at most; more is a table with a status column.

- **A card moves whole.** It has no handle: a pointer drags it from anywhere but its controls, and a click that barely moves is still a click. With the focus on its link, Alt and ← or → (⌥ on a Mac) moves it a column over, Alt and ↑ or ↓ a place up or down. A drag is never the only way: give each card a way to move without one, a **Move to** in a ⋯ menu drawn on every card in `BoardCardActions`, or its status in its details ([WCAG 2.5.7](https://www.w3.org/WAI/WCAG22/Understanding/dragging-movements.html)). A card its **Move to** sends to another column takes the focus with it, on its link.
- **Ticked cards go together.** A `BoardCardSelect` ticks a card, and Shift ticks the run from the last one ticked, in the board's order. Grab one ticked card and the rest come with it, stacked under it; the bar that acts on a list's selection acts on the board's.
- **A drag from a box ticks every card it crosses.** Press a card's box and drag across other cards, into the next column too: each one the pointer passes is ticked, or unticked when the first box was ticked. A drag from the card's body still moves the card. Held at a column's foot the column scrolls on, and at the board's end the board does.
- **Its title is a link.** `BoardCardLink` takes a click anywhere on the card. One handled in place, the details beside the board, keeps its `href` for a middle click, and the card whose details are open is `current`.
- **What a move changes.** A move to another column changes the card's stage, a field like any other: say so as a change to that field is said, with Undo when it is one the page can take back. A move within its column changes the order alone, which moving it back undoes. A column a field orders has no such move.
- **A column a field orders keeps that order.** When a column follows a field, the latest change first or the date a card is due, the reader cannot order its cards, as a list that follows a field is sorted by it and its rows carry no handle. Give the column `landsAt`, and a card moved into it lands there: a drag into it opens that place wherever the pointer is, and scrolls the column to it once the drag rests there. A drag within it, and Alt with ↑ or ↓, leave the card where it is.

`onMove` hears each drop and each key press that moves a card, once: the cards, in the board's order, and the column and index they land at, counting the cards that stay; into a column a field orders, the index is its `landsAt`. `moveCards` applies it to an array of columns.

A column read a page at a time ends in **Load more** ([Loading, empty and error](/ui/guidelines/patterns/loading-empty-and-error/index.md)). Put it in a `BoardCardsFooter`, which keeps it at the foot of the cards while a card is dragged over them. A column hundreds of cards long draws only the cards near its view: lay out the rows `useBoardRows` gives, draw the place a drag opens as a `BoardPlaceholder`, and give `BoardCards` a `scrollToRow`, through which a card moved where nothing is drawn still takes the focus.

```tsx
import { Badge } from "@orz/ui/components/badge";
import {
  Board,
  BoardCard,
  BoardCardActions,
  BoardCardLink,
  BoardCardSelect,
  BoardCards,
  BoardCardsFooter,
  BoardColumn,
  BoardColumnCount,
  BoardColumnHeader,
  type BoardColumnPlaces,
  BoardColumnTitle,
  type BoardPlace,
  BoardPlaceholder,
  moveCards,
  useBoardRows,
} from "@orz/ui/components/board";
import { Button } from "@orz/ui/components/button";
import {
  DropdownMenu,
  DropdownMenuContent,
  DropdownMenuLabel,
  DropdownMenuRadioGroup,
  DropdownMenuRadioItem,
  DropdownMenuTrigger,
} from "@orz/ui/components/dropdown-menu";
import { LoadMoreFooter } from "@orz/ui/components/load-more";
import { Pane } from "@orz/ui/components/pane";
import { useVirtualizer } from "@tanstack/react-virtual";
import { EllipsisIcon } from "lucide-react";
import {
  type ComponentProps,
  type ReactNode,
  useLayoutEffect,
  useRef,
  useState,
} from "react";

const QUEUES: Record<string, string> = {
  new: "New",
  open: "Open",
  solved: "Solved",
};
const SUBJECTS = [
  "Can't sign in after the update",
  "Invoice shows the wrong currency",
  "Export stops at ten thousand rows",
  "Reset link has expired",
  "Two-factor code is rejected",
  "Upload times out on large files",
  "Search misses archived messages",
  "Dark theme resets on reload",
  "Charged twice this month",
  "Calendar shows the wrong time zone",
  "Can't remove a former teammate",
  "Webhook fires twice",
];
const TOPICS = ["account", "billing", "bug", "question"];

const tickets = (from: number, count: number) =>
  Array.from({ length: count }, (_, i) => String(from - i));
const SOLVED = tickets(4600, 600);
const PAGE = 100;

type Move = (ids: string[], to: BoardPlace) => void;

function Ticket({
  id,
  queue,
  move,
  ...props
}: Omit<ComponentProps<typeof BoardCard>, "id" | "name"> & {
  id: string;
  queue: string;
  move: Move;
}) {
  const n = Number(id);
  return (
    <BoardCard id={id} name={`#${id}`} {...props}>
      <div className="flex items-start gap-2">
        <BoardCardLink href={`#ticket-${id}`} className="flex-1">
          {SUBJECTS[n % SUBJECTS.length]}
        </BoardCardLink>
        <BoardCardSelect id={id} className="mt-0.5" />
      </div>
      <div className="flex items-center gap-2 text-muted-foreground text-ui-sm">
        <span className="font-mono">#{id}</span>
        <Badge variant="dot">{TOPICS[n % TOPICS.length]}</Badge>
        <BoardCardActions className="-my-1 ml-auto">
          <DropdownMenu>
            <DropdownMenuTrigger asChild>
              <Button
                variant="ghost"
                size="icon-sm"
                aria-label={`Actions for #${id}`}
              >
                <EllipsisIcon />
              </Button>
            </DropdownMenuTrigger>
            <DropdownMenuContent align="end" className="w-44">
              <DropdownMenuLabel>Move to</DropdownMenuLabel>
              <DropdownMenuRadioGroup
                value={queue}
                onValueChange={(next) => {
                  if (next !== queue) move([id], { column: next, index: 0 });
                }}
              >
                {Object.entries(QUEUES).map(([each, name]) => (
                  <DropdownMenuRadioItem key={each} value={each}>
                    {name}
                  </DropdownMenuRadioItem>
                ))}
              </DropdownMenuRadioGroup>
            </DropdownMenuContent>
          </DropdownMenu>
        </BoardCardActions>
      </div>
    </BoardCard>
  );
}

/** A queue too long to draw whole: only the rows near its view, each placed where it stands. */
function VirtualTickets({
  queue,
  move,
  children,
}: {
  queue: string;
  move: Move;
  children?: ReactNode;
}) {
  const rows = useBoardRows();
  const scroller = useRef<HTMLUListElement>(null);
  // The rows start below the list's own padding, as its cards would in the flow.
  const [top, setTop] = useState(0);
  useLayoutEffect(() => {
    const list = scroller.current;
    if (list) setTop(Number.parseFloat(getComputedStyle(list).paddingTop) || 0);
  }, []);
  const virtualizer = useVirtualizer({
    count: rows.length,
    getScrollElement: () => scroller.current,
    estimateSize: (index) => {
      const row = rows[index];
      return row?.type === "place" ? row.height : 76;
    },
    getItemKey: (index) => {
      const row = rows[index];
      return row?.type === "card" ? row.id : "place";
    },
    gap: 8,
    overscan: 4,
    scrollMargin: top,
    scrollPaddingStart: top,
  });
  return (
    <BoardCards
      ref={scroller}
      className="relative"
      scrollToRow={(index) => virtualizer.scrollToIndex(index)}
    >
      <li
        aria-hidden
        className="shrink-0"
        style={{ height: virtualizer.getTotalSize() }}
      />
      {virtualizer.getVirtualItems().map((item) => {
        const row = rows[item.index];
        const place = {
          ref: virtualizer.measureElement,
          "data-index": item.index,
          className: "absolute inset-x-2 top-0",
          style: { transform: `translateY(${item.start}px)` },
        };
        return row?.type === "card" ? (
          <Ticket
            key={row.id}
            id={row.id}
            queue={queue}
            move={move}
            {...place}
          />
        ) : (
          <BoardPlaceholder key="place" {...place} />
        );
      })}
      {children}
    </BoardCards>
  );
}

export function SupportQueue() {
  const [columns, setColumns] = useState<BoardColumnPlaces[]>(() => [
    { id: "new", items: tickets(4612, 4), landsAt: 0 },
    { id: "open", items: tickets(4608, 8), landsAt: 0 },
    { id: "solved", items: SOLVED.slice(0, PAGE), landsAt: 0 },
  ]);
  const [selected, setSelected] = useState<string[]>([]);
  const [pending, setPending] = useState(false);
  const focusRequested = useRef(false);
  const read = new Set(columns.flatMap((column) => column.items));
  const unread = SOLVED.filter((id) => !read.has(id));
  const move: Move = (ids, to) => setColumns((now) => moveCards(now, ids, to));
  const loadMore = () => {
    focusRequested.current = true;
    setPending(true);
    setTimeout(() => {
      setColumns((now) =>
        now.map((column) =>
          column.id === "solved"
            ? { ...column, items: [...column.items, ...unread.slice(0, PAGE)] }
            : column,
        ),
      );
      setPending(false);
    }, 600);
  };
  const counted = columns.map((column) =>
    column.id === "solved"
      ? { ...column, count: column.items.length + unread.length }
      : column,
  );
  return (
    <Pane purpose="app" className="flex h-96 overflow-hidden">
      <Pane purpose="panel" className="flex min-w-0 flex-1 flex-col">
        <Board
          aria-label="Tickets"
          className="flex-1"
          columns={counted}
          selected={selected}
          onSelectedChange={setSelected}
          onMove={({ ids, to }) => move(ids, to)}
        >
          {counted.map((column) => (
            <BoardColumn key={column.id} id={column.id}>
              <BoardColumnHeader>
                <BoardColumnTitle>{QUEUES[column.id]}</BoardColumnTitle>
                <BoardColumnCount>
                  {column.count ?? column.items.length}
                </BoardColumnCount>
              </BoardColumnHeader>
              {column.id === "solved" ? (
                <VirtualTickets queue={column.id} move={move}>
                  {unread.length > 0 && (
                    <BoardCardsFooter>
                      <LoadMoreFooter
                        pending={pending}
                        error={null}
                        onLoadMore={loadMore}
                        focusRequested={focusRequested}
                      />
                    </BoardCardsFooter>
                  )}
                </VirtualTickets>
              ) : (
                <BoardCards>
                  {column.items.map((id) => (
                    <Ticket key={id} id={id} queue={column.id} move={move} />
                  ))}
                </BoardCards>
              )}
            </BoardColumn>
          ))}
        </Board>
      </Pane>
    </Pane>
  );
}
```

## Filtering and saving

- While a filter or a search hides some rows, draw no handles and no buttons: a place between rows the reader cannot see means nothing.
- Save a move as the page saves any other change: at once, or with the form's **Save**. Do not ask first, and do not toast it with **Undo**: moving the row back is the undo.

## On each platform

- **Pointer.** Drag the handle; press the buttons, or Alt+↑ and Alt+↓ from anywhere in the row. The handle is no Tab stop: the keyboard has the buttons.
- **Touch.** A finger on the handle drags the row at once, with no long press; a finger anywhere else on the row scrolls the page. The buttons keep their size, take hit areas, and stand far enough apart that a thumb meant for one never presses the other. A board's card has no handle: a finger held still on it lifts it, and one that moves at once scrolls the board. Its box to tick shows throughout, as there is no hover to bring it out, and a finger drawn across the boxes scrolls the board rather than ticking them.

## In the demos

- [Settings](/ui/demos/settings/index.md): Notifications' Send them by lists the channels in the order they are tried: drag one by its grip, or press its ↑ and ↓. Pick Nothing above, and the grips and buttons are disabled with the switches.
- [Tasks](/ui/demos/tasks/index.md): Switch to Board and drag a task to another column, or focus its title and press Alt and an arrow: it takes that column's status, with Undo in the toast. Tick two and drag one, and the other comes too; press a card's box and drag across others to tick them all, across columns too. Each card's ⋯ moves it without a drag.
