Templating variables in Panel SVG

How can I use templating variables of a dashboard in the Panel SVG code?
For example, I have a text box in my SVG code, referring to the serial number of an IoT device. I want to fill in this box based on the selected option of a drop down menu of a variable in my dashboard.