Prompts & Inputs
$

Select

FREE

Interactive keyboard-navigated menu with scrolling, descriptions, disabled options, and vim-style bindings.

interactiveasynckeyboard

# Preview

select-menu demo
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

PropTypeDefaultDescription
messagestringrequiredPrompt text displayed above options
optionsSelectOption[]requiredSelectable rows with label, value, description, disabled
pageSizenumber8Maximum visible rows before scrolling
vimbooleantrueEnable j/k navigation keys
Support TermUI