# reorderItems (@salmonui/dropdowns/listbox)

> The reorderItems function of @salmonui/dropdowns/listbox: Moves the items whose values are in values by delta positions (negative: up), keeping their relative order; items stop at the ends of the list (a block that reaches an end keeps its shape).

Canonical: https://salmonui.dev/docs/reference/dropdowns/listbox/reorderItems

```ts
import { reorderItems } from '@salmonui/dropdowns/listbox';
```

Entry index: https://salmonui.dev/docs/reference/dropdowns/listbox (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/dropdowns/listbox.md).

## Reference

Kind: function

```ts
function reorderItems<T>(list: readonly T[], values: Iterable<ListboxKey>, delta: number, getItemValue?: (item: T) => ListboxKey): T[];
```

Moves the items whose values are in `values` by `delta` positions
(negative: up), keeping their relative order; items stop at the ends of
the list (a block that reaches an end keeps its shape).
