Primitives / foldkit-primitives/dom
InputMask
const · packages/primitives/src/dom/input-mask.ts:90
const InputMask: Mount.MountDefinitionWithArgs<
'InputMask',
{ pattern: Schema.String },
{ readonly _tag: 'Input'; readonly value: string; readonly raw: string }
>An input mask as a Mount plus a pure mask function. The pattern language
is three placeholders — # digit, A letter, * either, all ASCII —
with every other character literal. Literals appear only once a later placeholder
consumes input, so partial values never dangle a separator. The Mount
rewrites the field, restores the caret approximately, and emits Input
with both the masked and raw values; the parent owns the state, like any
controlled input.
In the guides
- Find one by the jobPrimitives / foldkit-primitives
- The mapPrimitives / foldkit-primitives