Template:Tabs/Documentation
Purpose
Displays content in separate tabs. See also Template:Game Tabs.
Usage
{{Tabs |tab1= |content1= |tab2= |content2= }}
{{Tabs |tab1= |content1= |tab2= |content2= |tab3= |content3= }}
{{Tabs |tab1= |content1= |tab2= |content2= |tab3= |content3= |tab4= |content4= |tab5= |content5= }}
{{Tabs |tab1= |content1= |tab2= |content2= |tab3= |content3= |tab4= |content4= |tab5= |content5= |tab6= |content6= |tab7= |content7= |tab8= |content8= }}
{{Tabs |tab1= |content1= |tab2= |content2= |tab3= |content3= |tab4= |content4= |tab5= |content5= |tab6= |content6= |tab7= |content7= |tab8= |content8= |tab9= |content9= |tab10= |content10= |tab11= |content11= |tab12= |content12= |tab13= |content13= }}
{{Tabs |tab1= |content1= |tab2= |content2= |tab3= |content3= |tab4= |content4= |tab5= |content5= |tab6= |content6= |tab7= |content7= |tab8= |content8= |tab9= |content9= |tab10= |content10= |tab11= |content11= |tab12= |content12= |tab13= |content13= |tab14= |content14= |tab15= |content15= |tab16= |content16= |tab17= |content17= |tab18= |content18= |tab19= |content19= |tab20= |content20= |tab21= |content21= }}
{{Tabs |align= |columns= |default= |distribution= |position= |tab1= |tooltip1= |content1= |tab2= |tooltip2= |content2= }}
{{Tabs |align= |columns= |default= |distribution= |position= |tab1= |tooltip1= |content1= |tab2= |tooltip2= |content2= |tab3= |tooltip3= |content3= }}
{{Tabs |align= |columns= |default= |distribution= |position= |tab1= |tooltip1= |content1= |tab2= |tooltip2= |content2= |tab3= |tooltip3= |content3= |tab4= |tooltip4= |content4= |tab5= |tooltip5= |content5= }}
{{Tabs |align= |columns= |default= |distribution= |position= |tab1= |tooltip1= |content1= |tab2= |tooltip2= |content2= |tab3= |tooltip3= |content3= |tab4= |tooltip4= |content4= |tab5= |tooltip5= |content5= |tab6= |tooltip6= |content6= |tab7= |tooltip7= |content7= |tab8= |tooltip8= |content8= }}
{{Tabs |align= |columns= |default= |distribution= |position= |tab1= |tooltip1= |content1= |tab2= |tooltip2= |content2= |tab3= |tooltip3= |content3= |tab4= |tooltip4= |content4= |tab5= |tooltip5= |content5= |tab6= |tooltip6= |content6= |tab7= |tooltip7= |content7= |tab8= |tooltip8= |content8= |tab9= |tooltip9= |content9= |tab10= |tooltip10= |content10= |tab11= |tooltip11= |content11= |tab12= |tooltip12= |content12= |tab13= |tooltip13= |content13= }}
{{Tabs |align= |columns= |default= |distribution= |position= |tab1= |tooltip1= |content1= |tab2= |tooltip2= |content2= |tab3= |tooltip3= |content3= |tab4= |tooltip4= |content4= |tab5= |tooltip5= |content5= |tab6= |tooltip6= |content6= |tab7= |tooltip7= |content7= |tab8= |tooltip8= |content8= |tab9= |tooltip9= |content9= |tab10= |tooltip10= |content10= |tab11= |tooltip11= |content11= |tab12= |tooltip12= |content12= |tab13= |tooltip13= |content13= |tab14= |tooltip14= |content14= |tab15= |tooltip15= |content15= |tab16= |tooltip16= |content16= |tab17= |tooltip17= |content17= |tab18= |tooltip18= |content18= |tab19= |tooltip19= |content19= |tab20= |tooltip20= |content20= |tab21= |tooltip21= |content21= }}
Parameter | Status | Description | Accepted values | Default value |
---|---|---|---|---|
align | optional | Horizontal alignment of the tab container and its contents. |
| left |
columns | optional | A number. If specified, the tab buttons will attempt to arrange themselves in N columns of equal width. | ||
default | optional | A number. The index of the default tab. | 1 | |
distribution | optional | If set to stretch , the tab buttons will stretch to fill the space afforded by the tab container. Incompatible with columns . |
| |
position | optional | The vertical positioning of the tab buttons in relation to their content. |
| top |
tabN | required | The label for the tab button. | ||
tooltipN | optional | Tooltip to display when hovering on the tab button. Must be plain text without markup. | ||
contentN | required | The content to display for the tab. |
Displays content in separate tabs.
Parameter | Description | Type | Status | |
---|---|---|---|---|
align | align | Horizontal alignment of the tab container and its contents. | String | optional |
columns | columns | A number. If specified, the tab buttons will attempt to arrange themselves in N columns of equal width. | Number | optional |
default | default | A number. The index of the default tab. | Number | optional |
distribution | distribution | If set to <code>stretch</code>, the tab buttons will stretch to fill the space afforded by the tab container. Incompatible with <code>columns</code>. | String | optional |
position | position | The vertical positioning of the tab buttons in relation to their content. | String | optional |
tab1 | tab1 | The label for the tab button. | String | required |
tooltip1 | tooltip1 | Tooltip to display when hovering on the tab button. Must be plain text without markup. | String | optional |
content1 | content1 | The content to display for the tab. | String | required |
tab2 | tab2 | The label for the tab button. | String | required |
tooltip2 | tooltip2 | Tooltip to display when hovering on the tab button. Must be plain text without markup. | String | optional |
content2 | content2 | The content to display for the tab. | String | required |
tab3 | tab3 | The label for the tab button. | String | required |
tooltip3 | tooltip3 | Tooltip to display when hovering on the tab button. Must be plain text without markup. | String | optional |
content3 | content3 | The content to display for the tab. | String | required |
tab4 | tab4 | The label for the tab button. | String | required |
tooltip4 | tooltip4 | Tooltip to display when hovering on the tab button. Must be plain text without markup. | String | optional |
content4 | content4 | The content to display for the tab. | String | required |
tab5 | tab5 | The label for the tab button. | String | required |
tooltip5 | tooltip5 | Tooltip to display when hovering on the tab button. Must be plain text without markup. | String | optional |
content5 | content5 | The content to display for the tab. | String | required |
Examples
# | Input | Output | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | {{Tabs |tab1= Tab 1 |content1= Content 1111111111111111111111111111111111 |tab2= Tab 2 |content2= Content 2222222222222222222222222222222222 |tab3= Tab 3 |content3= Content 3333333333333333333333333333333333 }} |
Tab 1Tab 2Tab 3
Content 1111111111111111111111111111111111
Content 2222222222222222222222222222222222
Content 3333333333333333333333333333333333 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | {{Tabs |align= center |tab1= Tab 1 |tooltip1= First Tab |content1= Content 1111111111111111111111111111111111 |tab2= Tab 2 |tooltip2= Second Tab |content2= Content 2222222222222222222222222222222222 |tab3= Tab 3 |tooltip3= Third Tab |content3= Content 3333333333333333333333333333333333 }} |
Tab 1Tab 2Tab 3
Content 1111111111111111111111111111111111
Content 2222222222222222222222222222222222
Content 3333333333333333333333333333333333 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | {{Tabs |align= center |default= 2 |position= bottom |tab1= Tab 1 |content1= Content 1111111111111111111111111111111111 |tab2= Tab 2 |content2= Content 2222222222222222222222222222222222 |tab3= Tab 3 |content3= Content 3333333333333333333333333333333333 }} |
Content 1111111111111111111111111111111111
Content 2222222222222222222222222222222222
Content 3333333333333333333333333333333333 Tab 1Tab 2Tab 3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | {{Tabs |distribution= stretch |tab1= Tab 1 |content1= Content 1111111111111111111111111111111111 |tab2= Tab 2 |content2= Content 2222222222222222222222222222222222 |tab3= Tab 3 |content3= Content 3333333333333333333333333333333333 }} |
Tab 1Tab 2Tab 3
Content 1111111111111111111111111111111111
Content 2222222222222222222222222222222222
Content 3333333333333333333333333333333333 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | {{Tabs |align= center |columns= 2 |tab1= [[File:OOS Spring.png|link=]] |tooltip1= Spring |content1= [[File:Holodrum Spring.png|300px]] |tab2= [[File:OOS Summer.png|link=]] |tooltip2= Summer |content2= [[File:Holodrum Summer.png|300px]] |tab3= [[File:OOS Autumn.png|link=]] |tooltip3= Autumn |content3= [[File:Holodrum Autumn.png|300px]] |tab4= [[File:OOS Winter.png|link=]] |tooltip4= Winter |content4= [[File:Holodrum Winter.png|300px]] }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wrap content in nowiki tabs when it contains pipe characters (e.g. tables) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | {{Tabs |tab1= Tab 1 |content1= <nowiki> {| class="wikitable" ! Header 1 ! Header 2 |- | A || B |- | C || D |} </nowiki> |tab2= Tab 2 |content2= <nowiki> {| class="wikitable" ! Header 1 ! Header 2 |- | D || E |- | F || G |} </nowiki> }} |
Tab 1Tab 2
|
Guidelines
- Tabs should represent the same kind of content. Don’t use tabs to group content that is dissimilar.
- Tabs can be used to add a third dimension to data tables. See Kafei#Schedule, for example.
- Images can be used as labels on the tab buttons. In this case you must remove the link from the image with
link=
, otherwise clicking on the tab will link to the file page instead of switching the tab. - Tabs should be clearly labeled and self-evident. If abbreviations must absolutely be used to save space – or if using images – include a tooltip to properly describe the tab.
Use on Other Wikis
If you are from another wiki and wish to have tabs on your wiki, here are instructions for copying over the code. Please give credit and link back to Zelda Wiki if you do so.
1. Copy the following pages:
- All of Category:Utility Modules
- Module:Tabs
- Template:Tabs
- MediaWiki:Gadget-Tabs
- MediaWiki:Gadget-Tabs.css
- MediaWiki:Gadget-Tabs.js
2. Enable Extension:Gadgets on your wiki.
3. Add an entry to MediaWiki:Gadgets-definition on your wiki. Example