Tabs and accordion layouts
Every group can be shown in two layouts. You choose the layout where you show the group, so the same group can be tabs on one page and an accordion on another.
| Layout | Looks like | Where you choose it |
|---|---|---|
| Tabs | Tab titles in a row, the content of the active tab below them. | Menu item type Tabs View, module Layout Tabs, editor button Select Layout Tabs. |
| Accordion | Titles one below the other. A title opens its content right below it. | Menu item type Accordion View, module Layout Accordion, editor button Select Layout Accordion. |
Behaviour settings
These settings are in the JoomTabs options. Most of them can be changed per menu item and per module.
| Setting | What it does |
|---|---|
| Tabs Trigger | Click opens a tab when it is clicked. Hover opens it when the mouse rests on it. On phones and tablets JoomTabs always uses click. |
| Transition Speed | Slow, Normal or Fast animation when the content changes. Set in the options only. |
| Accordion Layout Display | First out opens the first item when the page loads. All in starts with all items closed. Accordion layout only. |
| Start Item | The number of the tab or accordion item that is open when the page loads. 1 is the first. |
| Scroll To Accordion Item | Scrolls the page to the item the visitor opened. Main Accordion Only works in the accordion layout, Article Category Accordion Only inside category tabs, Both for both. |
| Truncate Titles | Yes cuts long titles in accordions to one line. No shows them in full on several lines. |
| Video Automatic Play/Pause | See Video Link tabs. |
In the accordion layout, clicking an open title closes it again. Opening another title closes the one that was open.
Link to a tab
On a menu item page, add tab= and the tab number to the address to open that tab, for example https://example.com/product?tab=3. This works for the menu item page only, not for the module or tabs inside articles.
Keyboard use
With WCAG Script set to Yes in the options, which is the default, visitors can use the keyboard:
- The Tab key moves to the next tab title and opens it.
- The left and right arrow keys move between tab titles.
- In category accordions, the up and down arrow keys move between articles.
Small screens
On screens up to 600 pixels wide, tab titles stack one below the other at the full width of the page. For narrow module positions, the accordion layout often reads better.
Loading
Until the script of the page has run, JoomTabs shows a small loading picture and keeps the tabs hidden, so visitors do not see the content of all tabs at once.