Choice Group Component

A CSS implementation of the Sprout choice-group component.

Example

html
<div class="spr-choice-group">
   <div class="spr-choice-button spr-choice-button-open spr-choice-button-active" tabindex="0" role="button">
     <div class="spr-choice-button-header">
        <span>Yes, I would like to do the thing</span>
     </div>
     <div class="spr-choice-button-content">
       <div class="spr-stack-container-md">
         <p>The thing is very important and you should do it.</p>
         <p>But you don't have to if you don't want to, you have options.</p>
       </div>
     </div>
   </div>
   <div class="spr-choice-button spr-choice-button-closed" tabindex="0" role="button">
     <div class="spr-choice-button-header">
        <span>No, I do not like the thing</span>
     </div>
     <div class="spr-choice-button-content" style="height: 0; visibility: hidden; opacity: 0; overflow: hidden;">
       <p>This won't be visible in the example so it doesn't matter</p>
     </div>
   </div>
   <div class="spr-choice-button spr-choice-button-closed" tabindex="0" role="button">
     <div class="spr-choice-button-header">
        <span>I don't know enough about the thing</span>
     </div>
     <div class="spr-choice-button-content" style="height: 0; visibility: hidden; opacity: 0; overflow: hidden;">
       <p>This won't be visible in the example so it doesn't matter</p>
     </div>
   </div>
</div>
<style>p { margin: 0 }</style>

Compiled CSS

Example

scss
@import 'components/choice-group';