# KptOrderList (kpt-order-list) A list with manual reordering (up/down). Select an item and move it with the buttons, or turn on `dragdrop` and drag it into place. The item template comes through projection: ``. Import: `import { KptOrderList } from '@konce-pt/angular';` ## Inputs / model - `items`: model (two-way - returns the new order) - `header`: string - `dragdrop`: boolean, default false - enables dragging (opt-in, nothing changes without it) - `layoutMotion`: `'spring' | 'arc' | 'morph' | 'none'` (default from `provideKptMotion`, else `spring`) - see below ## Example {{ item.name }} ## Where a dragged item lands Dropping onto a row puts the dragged item at that row's position and everything else shifts, while the buttons keep swapping with the neighbour. Dropping on the empty part of the list appends at the end. Either way the selection follows the item, so the next button press moves the same entry. ## Reorder motion `layoutMotion` animates a reorder made by the user (buttons, `Alt`+ArrowUp/ArrowDown, dragging): - `spring` - the moved item glides to its new place on a spring; - `arc` - the moved item lifts (shadow) and lands, above its neighbours; - `morph` - the browser's own morph (View Transitions); without support the change is instant; - `none` - no motion. Neighbours always make room with a calm spring, and the list scrolls to keep the moved item in view. With no value it takes `layout` from `provideKptMotion` (default `spring`); `enabled: false` and the system "reduce motion" setting always win. A list replaced from outside (`[items]`) switches instantly. ## Tokens Selection `--kpt-color-primary`; buttons `--kpt-color-surface-raised`. ## Keyboard The list is a `listbox` with a single Tab stop (roving tabindex), and the selection follows focus: - `ArrowDown` / `ArrowUp` select the next / previous item (wrapping), `Home` / `End` the first / last; - `Alt`+`ArrowUp` / `Alt`+`ArrowDown` move the selected item one place up / down - focus travels with it, so repeated presses keep moving the same entry. The up / down buttons stay and act on the same selection. ## Accessibility The list is named after `header` (`aria-label`) and the selected item carries `aria-selected`. Both buttons are labelled from the dictionary and go disabled while nothing is selected. Native HTML5 drag and drop has no keyboard equivalent - `Alt`+arrows and the buttons cover it, and `dragdrop` adds to them, it never replaces them. ## Announcements Every reorder (buttons, Alt+ArrowUp/ArrowDown, drag and drop) is announced in a polite live region: `orderList.moved` with `{position}` and `{total}` - focus does not move, so a screen reader would not hear the new place otherwise.