JSFiddle - React, Tailwind, and code Playground
HTML
<input name="file" type="radio" value="file" checked>File<input type="file" name="file" class='type'>
<br>
<input name="file" type="radio" value="url">URL<input type="text" name="url" style='display: none;' class='type'>
JavaScript
$("input:radio").change(function() {
$(".type").hide();
$(this).next("input").show();
});