ORIZEN/TUI
ComponentsMultiSelect

MultiSelect

stable

Arrow-key list with space-to-toggle multi-choice selection.

Browser preview is a simulation. The copied component runs in actual terminal apps.

multi-select.tsx
Pick frameworks:(space to toggle)
React
Vue
Svelte
Solid

Installation

npx orizen-tui@latest add multi-select

if dependency install fails, run: npm install ink@^5.0.1 react@^18.3.1 @types/react@^18.3.18 orizen-tui-core@latest

Usage

multi-select.imports.tsx
multi-select.example.tsx

Examples

Usage

multi-select.example1.tsx
Pick frameworks:(space to toggle)
React
Vue
Svelte
Solid

API Reference

MultiSelect

items-
Array<{ label: string; value: string }>

List of selectable items

value-
string[]

Selected values (controlled)

onChange-
(values: string[]) => void

Called when selection changes (controlled)

defaultValue[]
string[]

Initial values (uncontrolled)

onSubmitundefined
(values: string[]) => void

Called when Enter is pressed

labelundefined
string

Heading above the list

focustrue
boolean

Whether list accepts keyboard events