EnterUI
DocsComponentsThemesExamplesDonation
Get Started
      • CurrencyInput
      • MaskedInput
      • URLInput

Default usage

  1. EnterUI
  2. /Docs
  3. /Inputs
  4. /Form Controls
  5. /Specialized Inputs
  6. /MaskedInput
Updated 3 October 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
  • Default usage
  • Import
  • Controlled
  • Patterns
  • Accessibility
  • API
  • Styling