Skip to content

MaskedInput

uitemplate

Color for the text

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

PropTypeRequiredDescription
maskstringrequiredMask template
placeholderstringoptionalCharacter shown in empty slots
onComplete(value: string) => voidoptionalCallback when all slots are filled
onChange(value: string) => voidoptionalCallback on every change
colorColoroptionalColor for the text
#template#masked-input