Theme

Start Here

Start from the smallest working snippet, then move to interactive examples and the full API contract below.

Styled quick start

Copy this entrypoint first. It includes the imports required to get the component on screen.

svelte
<script lang="ts">
  import '@dryui/ui/themes/default.css';
  import '@dryui/ui/themes/dark.css';
  import { Transfer } from '@dryui/ui';
</script>

<Transfer.Root>
  <Transfer.List>...</Transfer.List>
  <Transfer.Item>...</Transfer.Item>
  <Transfer.Actions>...</Transfer.Actions>
</Transfer.Root>

Import options

Root package

ts
import { Transfer } from '@dryui/ui'

Per-component subpath

ts
import { Transfer } from '@dryui/ui/transfer'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Basic Transfer

0/5
0/0
svelte
<Transfer.Root sourceItems={[
  { key: 'apple', label: 'Apple' },
  { key: 'banana', label: 'Banana' },
  { key: 'cherry', label: 'Cherry' },
]}>
  <Transfer.List type="source" title="Available" />
  <Transfer.Actions />
  <Transfer.List type="target" title="Selected" />
</Transfer.Root>

Filterable Lists

0/5
0/0
svelte
<Transfer.Root sourceItems={items}>
  <Transfer.List type="source" title="Available" filterable />
  <Transfer.Actions />
  <Transfer.List type="target" title="Selected" filterable />
</Transfer.Root>

Structure

Compound components always start with Transfer.Root. Use this structure block to understand required wrappers before you wire state or styling.

Transfer.Root
  Transfer.List
  Transfer.Item
  Transfer.Actions
Transfer.Root Transfer.ListTransfer.ItemTransfer.Actions

Compose

The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.

Compound component. Start with Transfer.Root, then add only the parts you need.

Transfer.ListTransfer.ItemTransfer.Actions

Transfer.Root

Prop Type Default Required Bindable
sourceItems
TransferItemType[]
[]
targetItems
TransferItemType[]
[]
onChange
(source: TransferItemType[], target: TransferItemType[]) => void
() => {
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.

Transfer.List

Prop Type Default Required Bindable
type
sourcetarget
title
string
filterable
boolean
false
content
Snippet<[{ items: TransferItemType[] }]>

Forwards <div> attributes via rest props. Common examples: id, style, role.

Transfer.Item

Prop Type Default Required Bindable
key
string
type
sourcetarget
disabled
boolean
children
Snippet

Forwards native HTML attributes via rest props.

Transfer.Actions

Prop Type Default Required Bindable
children
Snippet<[{
moveToTarget
() => void
moveToSource
() => void
moveAllToTarget
() => void
moveAllToSource
() => void
canMoveToTarget
boolean
canMoveToSource
boolean

Forwards <div> attributes via rest props. Common examples: id, style, role. Omitted: children.