How to use the switch component with collapsibles

Last updated: June 26, 2024

You make combine the power of Replo's Switch and Collapsible components to create a page where toggling a switch on expands a collapsible to show more content.

  1. Navigate to the switch component on your page

  2. Add a toggle collapsible interaction to it

  3. Add a custom state to your switch, and set "show if" to the "collapsible is open"

  4. Set the "left offset" on this new state to 26px in the positioning panel

  5. You're done!