Where is that from? It looks like just a bunch of headers without any content; not content that has been collapsed. If you want to have collapsing content on desktop view, see Help:Collapsing. I am not sure how well this feature appears on mobile but it is the only option for desktop view. Mobile view headings should collapse be default.
I think they're probably showing the image as an example of headers that they want to be collapsible. The collapsible classes don't do anything at all on mobile, but that'd be fine since the headers are already collapsible on mobile as you said.
By "toggled between", do you mean placing them in tabs? Yes, you can do that but it won't be good on mobile. The tab feature doesn't work on mobile. The reason panels and sections works is because it is a different feature than regular tabs. I would suggest using nested panels/sections but I tried that once and it didn't work. The panels/sections feature for portable infoboxes is designed with the assumption that they aren't nested. So, it is possible but not in a way that will look good on mobile.
Andrewds1021 wrote: [...] I would suggest using nested panels/sections but I tried that once and it didn't work. [...]
Hmm, I'm a bit confused... I don't see how OP's purpose would require nested panels? Wouldn't just one do? Unless I'm not understanding OP's purpose, isn't something like this just what they're looking for - tabs to toggle between different information, which may imitate "separate infoboxes" - which only needs one panel?
Zouken wrote: O design most things with dextop in mind, and the wiki I work on and create has most people visit in desktop, mobile visiters are a minority. [...]
How do you know that mobile visitors are a minority, though? Only Fandom staff would have access to such statistics to form an informed opinion over, and unless you got such information from them, wouldn't it be just an assumption?
Even if mobile visitors are indeed a tiny minority, their experience still matters. It's only a good practice to make design and functionality choices that can accommodate and be welcoming to users across all devices; especially when it's easily viable to do so.
I am the Founder and Admij of the Shinza Banshou Wiki, I get sent information of vists per day, most visted pages, percentages of people who visit on mobile, tablet, or computer; the percentages that use different browsers, and the countries of origin.
Oh, so that parameter also changes background color for selected tabs... I got confused, my bad. The template is more cluttered than needed, IMO, especially for you needs.
I think it'd be better that I rewrite it and add what you need along the way. So does the maintext part need to have the same specific background color (#000) for all characters, or does it need to have variable color for different characters through a certain parameter? Also, do you want to have a parameter to specify background color for the other tabs besides maintext?
Sorry for coming back to you late, my internet connection wasn't working.
All right, so I tidied it up plenty much and it should be about the same, just with a lesser cluttered source code! :) I also added a parameter for background color exclusively for linkless tab, mainbackcolor. It's #000 by default.
On a side note, you don't have to fill tab<number> parameters if the title of tab is supposed to be the same as link<number>. So as an example, just this'll do the work on Frederica page: