An Easy way to make things "Toggleable"

I know there is a way to do that, but I really didn’t understand

Main idea

The idea is make a component that you’ve selected into a dropdown or collapsible or whatever, in a simpler way

The app will auto add data-bs-stuff in that selected and handle components, this will eliminate extra steps for doing this task.

I hope I was clear, as English is not my mother tongue.