css-toggle
css-toggle copied to clipboard
allow connecting more distant elements to the same toggle
There are use cases for connecting more distant elements with the same toggle. For example, typical tab component markup might look something like (in very abbreviated form, with names I just made up):
<tab-view>
<tab-strip>
<tab/>
<tab/>
<tab/>
</tab-strip>
<panel-set>
<panel/>
<panel/>
<panel/>
</panel-set>
</tab-view>
With this sort of markup, it's hard to model the three tabs using three separate toggles, each with two states, connected into a toggle group. (They could be modeled as a single 3-state toggle, but that has disadvantages, particularly when reordering, adding, or removing tabs.)
It would be desirable to have a way to use a group of 2-state toggles for markup like this.