JSFiddle - React, Tailwind, and code Playground

HTML

<input class="radio-checkbox" type="radio" name="choice" value="custom_msg" checked>Custom Message :<br/>
<input style="width:200px" placeholder="your msg" type="text" id="custom_text"/>

<br/>

<input class="radio-checkbox" type="radio" name="choice" value="custom_img">Image :<br/>
<input style="width:200px" placeholder="an image url" type="text" id="custom_img"/>

JavaScript

$(document).ready(function(){

$(".radio-checkbox").change(function() {
    if(this.checked) {
        $(this).next().$("input").prop('disabled', true);
    }
});
    
    });