NEURALNG

INPUTMASK

API

The complete public contract of canonical NeuralInputMask.

Inputs

NameTypeDefaultDescription
value string '' Formatted or raw model, according to unmask.
mask string '' Deterministic mask grammar.
slotChar string '_' First character used for empty slots.
unmask boolean false Exposes raw slot characters to the model.
showMaskOnFocus boolean true Shows literals and empty slots while focused.
clearIncomplete boolean false Clears a partial value on blur.
disabled boolean false Disables native interaction and Forms control.
readonly boolean false Keeps the value focusable without mutation.
required boolean false Exposes native and ARIA required state.
invalid boolean false Exposes invalid styling and ARIA.
pending boolean false Exposes busy state through aria-busy.
touched boolean false External Forms state hook.
dirty boolean false External Forms state hook.
name string '' Native form-control name.
autocomplete string 'off' Native autofill purpose.
inputMode string 'text' Native virtual keyboard hint.
placeholder string '' Native placeholder; never an accessible label.
ariaLabel string '' Accessible name outside a visible label.
inputMaskId string '' Explicit native input ID outside Field.
fluid boolean false Fills the available inline width.
unstyled boolean false Removes NeuralNg visual classes.
inputMaskClass string '' Consumer root class.
inputClass string '' Consumer native input class.
classes NeuralInputMaskClasses {} Typed root and input slots.

Events

valueChangestring

Generated model output for every accepted edit.

completeNeuralInputMaskCompleteEvent

All mask slots became complete.

incompleteNeuralInputMaskCompleteEvent

Partial value blurred without clearing.

touchvoid

Native input blurred.

Public methods

focus(options?)

Focuses the native masked input.

select()

Selects the complete displayed value.

reset()

Clears raw, formatted and model values.

Pure utilities

The entry point also exports deterministic formatting helpers for application code and tests.

formatNeuralMask(rawValue, mask, slotChar?)

Formats raw characters with visible slots.

unmaskNeuralValue(value, mask)

Extracts accepted slot characters.

Typed class slots

rootinput

Structural classes remain in unstyled mode. inputMaskClass and inputClass are direct consumer escape hatches.