JSFiddle - React, Tailwind, and code Playground

HTML

<dl>
    
    <dt>A</dt>
    <dd>A1</dd>

    <dt>B</dt>
    <dd>B1</dd>
    <dd>B2</dd>
    <dd>B3</dd>

    <dt>C</dt>
    <dd>C1</dd>
    <dd>C2</dd>
    
</dl>

CSS

dt { 
    background:black;
    color:white;
    font-weight:bold;
    text-indent:5px;
    cursor:pointer;
}

dd { 
    text-indent:5px;
    display:none
}

JavaScript

$(function(){
    $('dt').click(function() {     
        $(this).siblings('dd').slideUp('slow');
        $(this).nextUntil('dt').slideDown('slow');
        return false;
    });
});