JSFiddle - React, Tailwind, and code Playground

You don't need to start from scratch..

HTML

<script src="http://igorescobar.github.io/jQuery-Mask-Plugin/js/jquery.mask.min.js"></script>
<input type="text" id="myInput" />

JavaScript

$('#myInput').mask('00.000.000,00', {
  reverse: true
});