JSFiddle - React, Tailwind, and code Playground

by Norlihazmey Ghazali

HTML

<input type="text" id="phone"/>

JavaScript

$('#phone').keyup( function (){
	if ( this.value.charAt(0) != 6 && this.value )
  	this.value = '6' + this.value;
});