React MaskedInput Fluid Size Example. The width of the React MaskedInput in this demo is in Percentages.

React MaskedInput: Fluid Size

Pf React Masked Input the width and height are set in percentages.

A live React example of jqxMaskedInput, the jQWidgets MaskedInput component, with its complete source code below. It is one of 4 jqxMaskedInput demos for React.

jqxMaskedInput API used in this demo

Source code

To run it in your own app, install the package with npm install jqwidgets-scripts, add these files to a Vite React and TypeScript project, and import jqx.base.css and a theme in main.tsx. Getting started with jqxMaskedInput shows the setup step by step.

App.tsx

import type { JSX } from 'react';
import JqxMaskedInput from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxmaskedinput';

function App(): JSX.Element {
    return (
        <div>
            <div style={{ fontSize: '13px', fontFamily: 'Verdana', marginTop: '10px' }}>
                Phone Number
            </div>
            <JqxMaskedInput
                theme="tailwind-blue-dark"
                style={{ marginTop: '3px' }}
                width="50%"
                height={35}
                mask="(###)###-####"
            />
        </div>
    );
}

export default App;

Learn more

More React MaskedInput demos