JSFiddle - React, Tailwind, and code Playground

by Pavan Kumar

HTML

<div class="field">
 <label for="bathroom_accessory_bath_accessories">Bath accessories</label><br>
<select name="bathroom_accessory[bath_accessories]"   id="bathroom_accessory_bath_accessories">
<option value="Shower">Shower</option>
<option value="Extractor Fan">Extractor Fan</option>
<option value="Lights">Lights</option>
<option value="Shaver">Shaver</option>
<option value="Heat Rail">Heat Rail</option></select><br>
</div>

 <div class="field" id="shower_id">
  <label for="bathroom_accessory_watts">Watts</label><br>
 <input type="number" name="bathroom_accessory[watts]" id="bathroom_accessory_watts" />
</div>

JavaScript

$('#bathroom_accessory_bath_accessories').on('change',function(){
        if( $(this).val()==="Shower"){
        $("#shower_id").show()
        }
        else{
        $("#shower_id").hide()
        }
    });