Prompts & Inputs
$

Confirm

FREE

Yes/no confirmation prompt with keyboard toggle. Supports arrows, y/n keys, Tab, and vim bindings.

interactiveyes/nokeyboard

# Preview

confirm demo
BOOTING PREVIEW

# Usage

import { confirm } from '@taracod/termui';

const ok = await confirm({
  message: 'Delete all files?',
  defaultValue: false,
});

if (ok) {
  console.log('Deleted!');
} else {
  console.log('Cancelled.');
}

# API

PropTypeDefaultDescription
messagestringrequiredPrompt text
defaultValuebooleanfalseInitial selected value
yesLabelstringYesLabel for true option
noLabelstringNoLabel for false option
Support TermUI