Live demo — this example is server-driven; run the showcase locally for the interactive version.

Dual list selector

Two parallel lists — "Available" and "Chosen" — with arrow buttons to move items between them. Use for selecting a subset from a large pool (permissions, members, options).

Examples

Basic

Click an item, then the arrow, to move it between panes.

Available options
Chosen options

Basic with tooltips

The move controls explain themselves on hover/focus.

Available options
Chosen options

Each pane filters with its own search input.

Using more complex options with actions

Items carry descriptions; double arrows move everything at once. PF\u2019s tree and draggable variants are covered by Tree view and Drag and drop.

Available options
Chosen options

Tree view

Live tree options — groups expand and collapse, group checks cascade to their leaves, counts and status update, and checked leaves transfer as a flat chosen list.

Available options
  • Colors
    • Green
Chosen options

Tree view with chosen and disabled options

pf-m-disabled options with disabled checks in both panes.

Available options
  • Colors 3
    • Red (disabled)
    • Orange
    • Yellow
Chosen options
0 of 2 options selected
  • Numbers 2
    • One
    • Two (disabled)

Draggable

Reorderable options — including multiple drop zones — live in the Drag and drop demo, whose dual-list variant reorders this same markup with the phaDragDrop pointer model.

Documentation

Dual list selector props

Parameters accepted by {#include components/forms/dual-list-selector ... /}. The pane / list / controls structure goes in the slot — the example wires Alpine state for the move-left / move-right logic.

* required
Name Type Description
* id String DOM id.
slot content Qute block Left pane + controls + right pane. The runtime template only renders the wrapper.

Usage

Server-side commit. The example tracks selections client-side. Submit the "chosen" list to the server on form submit (or live via HTMX) for persistence.