Skip to content
Alea0.1

Forms

Transfer

Move items between two lists, with search.

Ant Design: Transfer

import { Transfer } from '@alea/ui';

Examples

Transfer

Pick on one side, move with the buttons.

All plugins

7
Palette Generator
Type Scale
Color Blindness
Token Drift
Token Converter
A11y Handoff
Text Stress Test

In your bundle

1
Contrast Checker

Props

Transfer props

Move items between two lists: available and chosen (Ant's Transfer).

PropTypeDefaultDescription
itemsrequiredTransferItem[]-All the items: id and label.
defaultValueKey[]-The ids on the right to start with.
onChange((keys: Key[]) => void)-Called with the ids on the right.
searchableboolean-Adds a search field to each list.
titles[string, string]-Titles of the two lists.
valueKey[]-Ids on the right side (controlled).

Accessibility

  • Two labelled lists; the move buttons say how many items they move and where.

Keyboard

KeyDoes
Arrow keysMove in a list
SpaceSelects an item
TabMoves to the move buttons and the other list

Do and don't

Do

  • Name both lists clearly (Available, Selected).
  • Add search when either list is longer than ten items.

Don't

  • Don't use it for fewer than five items: use checkboxes.
  • Don't reorder items when they move.
Tested with axe, keyboard and screen reader roles