JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<label for="buttonName">Enter Button Name:</label><input id="buttonName"><button id="createButton">Create Button</button>

<div id="buttonWidths"></div>
<div id="buttons"></div>

JavaScript

$('#createButton').button().click(function(){
    var buttonName = $('#buttonName').val();
    $('#buttonName').val("");
    $('#buttons').append($('<button>'+buttonName+'</button>').button());
    
    var widestButton = 0;
    $('#buttons button').each(function(){
        widestButton = Math.max($(this).width(), widestButton);
    });
    $('#buttons button').width(function(){
        if ($(this).width() < widestButton)
            $(this).width(widestButton);                        
    });
});