Blazor MaskedTextBox - Overview
- EDIT IN TELERIK REPL
- Change Theme
The MaskedTextBox component is part of Telerik UI for Blazor, a professional grade UI library with 100+ native components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
The Telerik UI for Blazor MaskedTextBox allows you to get user input while ensuring valid entry of specific formats.
The Blazor MaskedTextBox component provides a mask and prompts the user to enter data in the required format, preventing input that does not match the mask. You can use it to show users the exact format they need to use to provide information like phone numbers, credit card numbers, ZIP codes, IP addresses, percentage values and so on.
You can also add a custom CSS class or control various attributes of the input element, such as the name, placeholder, tab index and more, as well as access and respond to events fired upon user behaviors.
Various features make the Telerik UI for Blazor MaskedTextBox a powerful form building component:
- Value: Can be used for binding.
- IncludeLiterals: Choose whether the literal characters such as brackets and dashes are included in the saved value. The default setting is false.
- Class: Use the wrapper class to modify the component’s style.
- DebounceDelay: Set time between typed entries and value updating.
- Placeholder: Display a string in the input area to instruct or direct the user.
- ValidateOn: Configure the event that will trigger validation.
- Mask: Show the pattern the user must follow.
- MaskOnFocus: Show the mask to the user only upon focus.
- Prompt: The character the user sees in the mask where there is no value.