JSFiddle - React, Tailwind, and code Playground

HTML

<label for="viaMail">Send offers to my mail</label>
<input type="checkbox" id="viaMail" class="slide" autocomplete="off">
<br />
<label for="viaEmail">Send offers to my email address</label>
<input type="checkbox" id="viaEmail" autocomplete="off">
<div class="viaMail">
test
</div>

CSS

.viaMail {
    display: none
}

JavaScript

$(function () {
    $('.slide').on("change", function () {
        if ($(this).is(':checked')) {
            $("." + $(this).attr('id')).slideDown('slow');
        } else {
            $("." + $(this).attr('id')).slideUp('fast');
        }
    });
});