JSFiddle - React, Tailwind, and code Playground
by Henry
HTML
<svg viewBox="0 0 258 34" xmlns="http://www.w3.org/2000/svg">
<text id="tester"><!-- << the question:
if these values weren't provided,
how would you calculate them? -->
my sample text
</text>
</svg>
JavaScript
var bbox = $("#"+ "tester")[0].getBBox();
alert('x: ' + bbox.x + 'y: ' + bbox.y);