An input value.
A mutable state of a formatted input.
Returns the initial mutable state of a formatted input corresponding to the given value.
A value provided to useFormattedInput.
OptionalgetReturns the selected text.
Called when text is copied or cut from a formatted input. By default, a substring of the formatted value is used.
The current state of the input.
The selected text.
OptionalonUpdates the state when the input is blurred. No-op by default.
The current state of the input.
Updates the state after the user changes the formatted value.
The state of the input before the formatted value change.
The new formatted value.
The new start of the text selection.
The new end of the text selection.
OptionalonUpdates the state when the input is focused. No-op by default.
The current state of the input.
OptionalonUpdates the state after the text selection changes.
By default, the state is updated with the new selection range.
The state of the input before the selection change.
The new start of the text selection.
The new end of the text selection.
A handler that updates state in response to various input events.
See
useFormattedInput