Prompts & Inputs
$

Input

FREE

Terminal input prompts with placeholders, validation, confirmed states, and masked password entry.

interactivevalidationmasked

# Preview

text-input demo
BOOTING PREVIEW

# Usage

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

const name = await input({ message: 'What is your name?' });

const email = await input({
  message: 'Email:',
  validate: (v) => v.includes('@') || 'Must be a valid email',
});

const password = await input({
  message: 'Password:',
  mask: '*',
  validate: (v) => v.length >= 8 || 'Must be at least 8 characters',
});

# API

PropTypeDefaultDescription
messagestringrequiredPrompt label shown before input
placeholderstringundefinedHint text before user types
maskstringundefinedCharacter used for password masking
validatefunctionundefinedReturn true or an error message
Support TermUI