Anybody? There are more examples of doing this with radio buttons than with action buttons that I can find. If it helps to see the exact code. This is the beginning html, before going into content for each div: <div class="tabbuttoncontainer">
<div class="tabbutton0">
<button class="tabbutton" type="action" name="act_allsection">ALL</button>
</div>
<div class="tabbutton1">
<button class="tabbutton" type="action" name="act_wepnstab">Weapons & Armor</button>
</div>
<div class="tabbutton2">
<button class="tabbutton" type="action" name="act_skillsandpoints" >SKILLS & POINTS</button>
</div>
<div class="tabbutton3">
<button class="tabbutton" type="action" name="act_spellstab" >SPELLS</button>
</div>
<div class="tabbutton4">
<button class="tabbutton" type="action" name="act_story" >STORY</button>
</div>
<div class="tabbutton5">
<button class="tabbutton" type="action" name="act_pointstab" >POINTS SPENT</button>
</div>
<div class="tabbutton6">
<button class="tabbutton" type="action" name="act_inventorytabsection" >INVENTORY</button>
</div>
</div>
<input type='hidden' class='sheet-tabstoggle' name='attr_sheetTab' value='allsection' />
<div class="allsection">
<div class="dodaslayout"> This is the sheetworker at the end: const buttonlist = ["allsection","wepnstab","skillsandpoints","spellstab","story","pointstab","inventorytabsection"];
buttonlist.forEach(button => {
on(`clicked:${button}`, function() {
setAttrs({
sheetTab: button
});
});
});
And the CSS: div.tabbuttoncontainer {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 470px;
margin-left: 5px;
}
button[type="action"].tabbutton {
font-family: 'Girassol';
font-size: 80%;
height: 12pt;
width: 75pt;
background-color: black;
color: white;
border: 1px solid gray;
border-radius: 80px;
-webkit-box-shadow: 2px 2px 11px 3px rgba(53, 39, 25, 0.45);
box-shadow: 1px 1px 8px 1px rgba(53, 39, 25, 0.45);
}
/*Configure the tab buttons*/
.allsection,
.wepnstab,
.skillsandpoints, .spellstab, .story, .pointstab, .inventorytabsection {
display: none;
}
/* show the selected tab */
.sheet-tabstoggle[value="allsection"] ~ div.allsection,
.sheet-tabstoggle[value="wepnstab"] ~ div.wepnstab,
.sheet-tabstoggle[value="skillsandpoints"] ~ div.skillsandpoints,
.sheet-tabstoggle[value="spellstab"] ~ div.spellstab,
.sheet-tabstoggle[value="story"] ~ div.story,
.sheet-tabstoggle[value="pointstab"] ~ div.pointstab,
.sheet-tabstoggle[value="inventorytabsection"] ~ div.inventorytabsection {
display: block;
}