JSFiddle - React, Tailwind, and code Playground
HTML
<input type='text' id='pro_barras' mycustomvar='custom'/>
JavaScript
var customValue = $('#pro_barras').attr('mycustomvar').val();
alert(customValue);
<input type='text' id='pro_barras' mycustomvar='custom'/>
var customValue = $('#pro_barras').attr('mycustomvar').val();
alert(customValue);