npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rcarls/rc-transfer-list

v0.3.2

Published

Transfer list that enhances a native <select multiple> into available and selected panes.

Readme

@rcarls/rc-transfer-list

Transfer list that enhances a native <select multiple> into available and selected panes.

Docs: https://richardcarls.github.io/rc-webcomponents/components/rc-transfer-list.

The component renders two listboxes and transfer/reorder actions in between. Available options are on the left, and selected options appear on the right. It is an older enterprise/admin UI pattern, but solves the specific problem of multiple selection within a large amount of options.

Modern use cases include user and permissions management tasks, multi-select for columns / fields / filters and list re-ordering.

Installation

npm install @rcarls/rc-transfer-list
yarn add @rcarls/rc-transfer-list

Import

import '@rcarls/rc-transfer-list/define';

Usage

<rc-transfer-list available-label="Available planets" selected-label="Mission route">
  <select name="planets" multiple>
    <option value="mercury">Mercury</option>
    <option value="venus" selected>Venus</option>
    <option value="earth">Earth</option>
    <option value="mars">Mars</option>
  </select>
</rc-transfer-list>

The selected/right-hand list is reflected back to the native select, so form submission serializes selected option values in the order shown in the selected panel.

Use the compact attribute when the surrounding layout should present the available list, actions, and selected list in one column. The component does not switch layout automatically at viewport breakpoints.

API

Properties

| Property | Attribute | Type | Default | Description | |---|---|---|---|---| | multiple | multiple | boolean | false | Allows multiple highlighted rows in each listbox. | | compact | compact | boolean | false | Stacks the panels and action toolbar into a compact one-column layout. | | availableLabel | available-label | string | 'Available' | Visible label for the available list. | | selectedLabel | selected-label | string | 'Selected' | Visible label for the selected list. | | available | - | ListboxOption[] | native select state | Gets or replaces unselected options. | | selected | - | ListboxOption[] | native select state | Gets or replaces selected options. | | defaultSelected | - | ListboxOption[] \| undefined | undefined | Initial uncontrolled selected options, applied before host selected writes. |

Methods

| Method | Description | |---|---| | addSelected() | Moves highlighted available options to the selected list. | | addAll() | Moves every available option to the selected list. | | removeSelected() | Moves highlighted selected options back to the available list. | | clearSelected() | Moves every selected option back to the available list. | | moveSelected(delta) | Reorders highlighted selected options by -1 or 1 rows. |

Events

| Event | Detail | Description | |---|---|---| | rc-transfer-list-change | { selected: ListboxOption[] } | Fires after a user action changes the selected/right-hand list. |

Host property writes to available, selected, or defaultSelected are silent.

Keyboard

The embedded rc-listbox controls provide list navigation and selection. The transfer list also supports these shortcuts when focus is inside the component:

| Shortcut | Action | |---|---| | Alt+ArrowRight | Add highlighted available options. | | Alt+ArrowLeft | Remove highlighted selected options. | | Alt+ArrowUp | Move highlighted selected options up. | | Alt+ArrowDown | Move highlighted selected options down. | | Enter | Add the highlighted available option in single-select mode. | | Delete | Remove highlighted selected options. |

Styling Hooks

Panels expose data-empty when their backing list has no options and data-has-selection when that panel currently has highlighted rows. The root exposes data-can-move-up and data-can-move-down when the selected panel has highlighted rows that can be reordered in that direction.

| CSS custom property | Default | Description | |---|---|---| | --rc-transfer-list-gap | var(--rc-control-gap, 0.75rem) | Gap between panels and the action toolbar. | | --rc-transfer-list-panel-gap | var(--rc-control-gap, 0.35rem) | Gap between a panel label and its listbox. | | --rc-transfer-list-listbox-min-block-size | 10rem | Minimum block size for each listbox. | | --rc-transfer-list-listbox-border | var(--rc-border, 1px solid ButtonBorder) | Border around each listbox. | | --rc-transfer-list-option-gap | var(--rc-item-gap, 0.4em) | Gap between option adornments and labels. | | --rc-transfer-list-option-padding-block | var(--rc-item-padding-block, 0.3em) | Block padding for option rows. | | --rc-transfer-list-option-padding-inline | var(--rc-item-padding-inline, 0.75em) | Inline padding for option rows. | | --rc-transfer-list-option-selected-bg | var(--rc-highlight, Highlight) | Selected option background. | | --rc-transfer-list-option-selected-color | var(--rc-highlight-text, HighlightText) | Selected option foreground. |

| Part | Description | |---|---| | root | Root layout wrapper. | | panel | Shared list panel surface. | | available-panel | Available/left panel. | | selected-panel | Selected/right panel. | | actions | Transfer action toolbar. | | button | Shared action button surface. |