Skip to content
CHOICE · FREE

TransferList

Move items between two lists to choose a subset.

Choosing a subset from a long list is easiest with two lists and buttons to move items between them.

Why it helps

  • Two lists, clear movement
  • Good for long lists
  • Simple to understand

Where it fits

  • Assigning users to a role
  • Choosing columns
  • Picking products
TransferList control in a RayCraft page

Example

<TransferList TItem="string" Items="_roles" @bind-Values="_chosen" Label="Roles" />
<span>Chosen: @(_chosen.Count == 0 ? "none" : string.Join(", ", _chosen))</span>

@code {
    private readonly string[] _roles = ["Reader", "Editor", "Reviewer", "Publisher", "Administrator", "Auditor"];
    private IReadOnlyCollection<string> _chosen = new List<string> { "Reader" };
}

A short fragment. Add @using RayCraft.Blazor.Components to your page and use an interactive render mode.

Included in RayCraft Free. Working examples are in the GitHub repository (MIT); it holds example and demo code, not the library code.

All controls ยท Documentation