Struggling with a design challenge that requires me to create a UI like the one shown in the following image.
This is how the closed accordion state looks: https://i.sstatic.net/THVgr.png
And here is the open accordion state. Notice the red circled area where the border height remains consistent. https://i.sstatic.net/doUnm.png
Below is a pseudo code snippet of how I achieved the above UI design:
<div class="card-wrapper" style="display:flex; flex-direction:column; border:1px solid #000; border-radius: 5px;">
<div class="card-body" style="border-left: 10px solid #F00; border-top-left-radius: 10px; border-bottom-left-radius: 10px;">
...
</div>
<div class="card-accordion-body">
...
</div>
</div>
Take a look at my final output: https://i.sstatic.net/oStw3.png