Masked input preview
Enter structured identifiers through a native text field while forms receive the exact raw token value.
pro · Forms · primitive
When to use
- Use it when a product interface needs enter structured identifiers through a native text field while forms receive the exact raw token value.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose form-field instead when a labeled email field with validation and help text is the actual interface need, rather than masked input.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/masked-inputImport components/ui/tidal.css, components/ui/masked-input.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/masked-input.css";
import{TidalMaskedInput}from"./components/ui/masked-input";
export default()=><div className="tidal-scope"><TidalMaskedInput label={"Demo"} mask={"value"} onValueChange={() => {}} value={"value"}/></div>;API and props
TidalMaskedInput.label (required)ReactNodeRequired label value accepted by this exported component.
TidalMaskedInput.mask (required)stringA bounded mask. Defaults: # digit, A ASCII letter, * ASCII letter or digit.
TidalMaskedInput.onValueChange (required)(value: string, event: ChangeEvent<HTMLInputElement> | KeyboardEvent<HTMLInputElement> | CompositionEvent<HTMLInputElement>) => voidCallback invoked when the value change interaction is proposed.
TidalMaskedInput.value (required)stringControlled raw token characters, without mask literals.
TidalMaskedInput.aria-disabledBooleanish | undefinedAccessible disabled supplied by the consumer.
TidalMaskedInput.aria-invalidboolean | "true" | "false" | "grammar" | "spelling" | undefinedAccessible invalid supplied by the consumer.
TidalMaskedInput.descriptionReactNodeOptional description value accepted by this exported component.
TidalMaskedInput.disabledboolean | undefinedOptional disabled value accepted by this exported component.
TidalMaskedInput.errorReactNodeOptional error value accepted by this exported component.
TidalMaskedInput.hiddenInputRefRef<HTMLInputElement> | undefinedOptional hidden input ref value accepted by this exported component.
TidalMaskedInput.labelsTidalMaskedInputLabels | undefinedOptional labels value accepted by this exported component.
TidalMaskedInput.namestring | undefinedOptional name value accepted by this exported component.
TidalMaskedInput.onChangeChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefinedCallback invoked when the change interaction is proposed.
TidalMaskedInput.onCompositionEndCompositionEventHandler<HTMLInputElement> | undefinedCallback invoked when the composition end interaction is proposed.
TidalMaskedInput.onCompositionStartCompositionEventHandler<HTMLInputElement> | undefinedCallback invoked when the composition start interaction is proposed.
TidalMaskedInput.onInputInputEventHandler<HTMLInputElement> | undefinedCallback invoked when the input interaction is proposed.
TidalMaskedInput.onKeyDownKeyboardEventHandler<HTMLInputElement> | undefinedCallback invoked when the key down interaction is proposed.
TidalMaskedInput.readOnlyboolean | undefinedOptional read only value accepted by this exported component.
TidalMaskedInput.requiredboolean | undefinedOptional required value accepted by this exported component.
TidalMaskedInput.rootClassNamestring | undefinedOptional root class name value accepted by this exported component.
TidalMaskedInput.tokensReadonlyArray<TidalMaskToken> | undefinedOptional tokens value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Keep field state, validation results, submission, and persistence in the host form workflow.