TransferList
Search, select, and move items between two lists.
Live TypeScript example
Try the component here, then use the source below in your application.
- JavaScript
- 2.5 KiB
- Component CSS
- 2.4 KiB
- Shared theme CSS
- 3.8 KiBonce per application
How sizes are measured
The JavaScript figure includes this component’s required helpers. CSS includes its styling dependencies. Each entry is bundled separately for ES2022, minified, then compressed with gzip level 9. Your bundler may share helpers across components. Images, fonts, examples and application code are excluded.
Before compression: JavaScript 6.4 KiB; component CSS 20.3 KiB. These figures describe browser assets, not the complete package download.
View all component measurements →Select items and move them between the lists.
import '@blukavantui/web/theme.css'
import {createTransferList} from '@blukavantui/web/transfer-list';
import '@blukavantui/web/transfer-list.css';
export function mount(host: HTMLElement) {
return createTransferList(
host,
{
AvailableLabel: "Available permissions",
SelectedLabel: "Assigned permissions",
SelectedKeys: ["read"],
Items: [
{ Key: "read", Label: "Read records" },
{ Key: "edit", Label: "Edit records" },
{
Key: "export",
Label: "Export records",
Description: "Download a report.",
},
{ Key: "admin", Label: "Administration", IsDisabled: true },
],
},
{
SelectionChanged: (keys) => {
host.dataset.selected = keys.join(",");
},
},
);
}
const instance = mount(document.getElementById('example')!)
// When this page or framework component is removed:
// instance.destroy()
Install the library and add the host element
npm install https://blukavantui.blutekmedia.com/downloads/blukavantui-web-0.6.3.tgz<div id="example"></div>This example uses the downloadable @blukavantui/web package. Your application handles persistence and authentication through its typed callbacks. The starter ZIP includes this same example.
createTransferList
Pass options as the second argument and callbacks in the third argument. Keep the returned instance to update options or dispose it when its view is removed.
import { createTransferList } from '@blukavantui/web/transfer-list';
import '@blukavantui/web/transfer-list.css';Load @blukavantui/web/theme.css once in your app shell.createTransferList(host: HTMLElement, options: TransferListOptions, events?: TransferListEvents)Reference for @blukavantui/web 0.6.3. Required and optional follow the shipped TypeScript declarations; optional does not imply a particular default. Pass typed arrays and objects directly where shown.
Options
6| Name | Type / requirement | Usage |
|---|---|---|
Items | TransferItem[]Required | |
SelectedKeys | string[]Optional | |
ShowSearch | booleanOptional | |
IsDisabled | booleanOptional | Disables interaction with this component. |
AvailableLabel | stringOptional | |
SelectedLabel | stringOptional |
Callbacks
1| Name | Type / requirement | Usage |
|---|---|---|
SelectionChanged | (keys: string[]) => void | Promise<void>Optional | Reports the new selection to your application. |
Instance methods & properties
3| Name | Signature / type | Usage |
|---|---|---|
element | HTMLElement | Root owned by this instance. Dispose before removing its host. |
update | (patch: Partial<TransferListOptions>) => void | Apply a partial options update to this instance. |
destroy | () => void | Dispose the instance and its listeners when the view is removed. |
Related data types
Expand a type for its fields and allowed values.
Callback
type Callback<T extends unknown[] = []> = (...args: T) => void | Promise<void>;TransferItem
interface TransferItem {
Key: string;
Label: string;
Description?: string;
IsDisabled?: boolean;
}Use these inputs, events, actions and structures in Service Studio. Names and data bindings are specific to the native Blocks.
Included in the planned free BluKavantUI Community edition. The official OutSystems Forge release is coming soon. View Community scope →
Open OutSystems showcase ↗- Web runtime
- Supported
- TypeScript
- Supported
- OutSystems
- Supported
Statuses describe the component’s rendered code and interactions. Supply accessible content and follow the component guidance when integrating it.
Accessibility guidance →Purpose and use
Use a transfer list when people need to build a selection from a known set, such as assigning permissions or team members.
Keyboard design guidance
Tab moves between search fields, checkboxes, and transfer buttons. Space marks an item; Enter activates a move. Disabled items stay in place.
See the support status above for review coverage and any limitations.
In your application
Provide useful labels, preserve visible focus, and test the component with your actual content. Use text alongside status colors and check contrast in each state.
Events0No events yet.
Interact with an example to see its events.