Prompts & Inputs
$
Select
FREEInteractive keyboard-navigated menu with scrolling, descriptions, disabled options, and vim-style bindings.
interactiveasynckeyboard
# Preview
BOOTING PREVIEW
# Usage
import { select } from '@taracod/termui';
const choice = await select({
message: 'Pick a framework:',
options: [
{ label: 'React', value: 'react', description: "Meta's UI library" },
{ label: 'Vue', value: 'vue', description: 'Progressive framework' },
{ label: 'Svelte', value: 'svelte', description: 'Compiled framework' },
{ label: 'Angular', value: 'angular', disabled: true },
],
});
console.log(`You chose: ${choice}`);# API
| Prop | Type | Default | Description |
|---|---|---|---|
| message | string | required | Prompt text displayed above options |
| options | SelectOption[] | required | Selectable rows with label, value, description, disabled |
| pageSize | number | 8 | Maximum visible rows before scrolling |
| vim | boolean | true | Enable j/k navigation keys |