JSFiddle - React, Tailwind, and code Playground

by sum1

HTML

<input type="Text" id="ip">

JavaScript

$("#ip").keydown(function(){
  var v =  $("#ip").val();
  if(v.match(/\d{3}+/g))
    $("#ip").val(v+".");
});