EEnterUI
DocsComponentsThemesDonation
Get Started
      • CurrencyInput
      • MaskedInput
      • URLInput
EnterUIDocsInputsForm ControlsSpecialized InputsMaskedInput
InputsUpdated 6 May 2026

MaskedInput

Simple masked text input for phone, serial, and license formats.

MaskedInput applies lightweight masks such as 999-999, AAAA-9999, and ***-999 without adding a parser dependency.

#Default usage

License key

Use A for letters, 9 for digits, and * for alphanumeric characters.

Code
<MaskedInput aria-label="License key" mask="AAAA-9999" />

#Import

Code
import { MaskedInput } from "@froggdesign/enter-ui-react";

#Controlled

Code
<MaskedInput
  mask="999-999"
  value={phone}
  onValueChange={(masked, raw) => {
    setPhone(masked);
    setPhoneRaw(raw);
  }}
/>

#Patterns

Use MaskedInput for short predictable formats: phone extensions, serial keys, invite codes, license keys, and support references.

#Accessibility

Keep the mask visible through placeholder or field help text so users understand the expected format. Masks are intentionally simple and should not replace server-side validation.

#API

  • mask: pattern using 9 for digits, A for letters, and * for alphanumeric characters.
  • value, defaultValue: masked value.
  • onValueChange: called with (maskedValue, rawValue).
  • placeholder: defaults to the mask.

#Styling

MaskedInput uses .eui-masked-input classes and FroggDesign tokens for layout, state, focus, and disabled styling.

PreviousCurrencyInput
NextURLInput

On this page

  1. Default usage
  2. Import
  3. Controlled
  4. Patterns
  5. Accessibility
  6. API
  7. Styling