Creating a switch

Hello, I have turned some buttons into switches by using Custom Attribute. However, if the content of the first button is active by default. The switch is not. This means that when I get to the page and click on the second switch, the content of the first switch is still displayed… But if I press the first button, then press the second button, the content of the second button replaces the content of the first.

This works fine, the only problem is that I have to press the first button at least once to activate the switch correctly.
Would you be able to make a button active by default through the Custom Attribute?

Thanks