Would it be sufficient to set the with the cssStyle attribute? Here is an example:
const board = JXG.JSXGraph.initBoard('jxgbox', {
boundingbox: [-5, 5, 5, -5], axis:true
});
var b1 = board.create('button', [-4, 2, 'button 1', () => {}], {cssStyle: 'width: 200px;' });
Best wishes,
Alfred