MaskedInput
uitemplate
Color for the text
Terminal
$termuijs render masked-input
Installation
$ bunx termuijs add masked-input
Copies the source into src/components/masked-input/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { MaskedInput } from '@termuijs/ui'ts
new MaskedInput(style: Partial<Style> = {}, options: MaskedInputOptions,)API Reference
MaskedInput
| Prop | Type | Required | Description |
|---|---|---|---|
mask | string | required | Mask template |
placeholder | string | optional | Character shown in empty slots |
onComplete | (value: string) => void | optional | Callback when all slots are filled |
onChange | (value: string) => void | optional | Callback on every change |
color | Color | optional | Color for the text |