JSFiddle - React, Tailwind, and code Playground

HTML

<div id="demo">
     <h3>Masked Input Plugin.</h3>

    <p>&nbsp;</p>
    <table border="0">
        <tbody>
            <tr>
                <td>
                    <input id="test" type="text" tabindex="8" />
                </td>
                <td></td>
            </tr>
        </tbody>
    </table>
    </div>

CSS

* {
    font-family:arial;
}
td {
    padding:7px;
}
h3 {
    font-weight:bold;
}

JavaScript

$(document).ready(function(){
  $("#test").mask("(999)999-99-99");
});