JSFiddle - React, Tailwind, and code Playground HTML <input type="text" oninput="this.value = this.value.replace(/(.)\1+/g, '$1')" />