Prompts & Inputs
$
Input
FREETerminal input prompts with placeholders, validation, confirmed states, and masked password entry.
interactivevalidationmasked
# Preview
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
| Prop | Type | Default | Description |
|---|---|---|---|
| message | string | required | Prompt label shown before input |
| placeholder | string | undefined | Hint text before user types |
| mask | string | undefined | Character used for password masking |
| validate | function | undefined | Return true or an error message |