Skip navigation links

Tabs

Tabs display a horizontal list of tabbed headings that, when clicked, reveal layered panels containing rich text content. Visitors can click the heading tabs to move between the panels. Only one panel displays at a time.

egr-civil-bs-program-overview-tabs
Figure 1: The Tabs component displays one panel at a time. The tab name for the visible tab is underlined in green.

 

Component Information

Benefits

  • Organize content into sections (tab panels) for easy viewing. 
  • Tabs optimize visible page space. Clickable tab headings control which panel is currently in view.
  • Tab headings allow visitors to scan a list of sections and show the content only for sections that are of interest.
  • Tabs allow the content author to hide detailed content until the visitor is ready to view it. The tab heading indicates the content that will be found within the panel.
  • Search engines crawl Tab content even though it is not always visible.

Example Use Cases

  • Provide a list of headings as scannable topics so that visitors only open the headings for which they want to see content.
  • Provide a menu of all topics. The visitor can quickly scan panel headings and locate specific topics of interest.
  • Provide a “big picture” to the visitor before they view all the details.
  • Provide an efficient way of presenting content by minimizing page length and scrolling. This is especially helpful for mobile users.
  • Eliminate the need for multiple pages when all page content can be placed in separate tabs panels on a single page. This is a good solution when page content is not lengthy.
     

Template Data

Field names are the same in Pages, Explorer and Content Editor, unless specifically noted.

  • There are no fields in this section.
  • The component has a unique name (used as internal Sitecore identifier). 

Frequently Asked Questions

Yes, by adding a URL parameter that specifies the panel’s GUID (unique identifier). See “Instructions” for more information.

No, images are not supported in the heading.

Instructions for Use

In Pages:

  1. Select the page in the content tree.
  2. Click “+” button in any Placeholder box below the Breadcrumb links.
  3. Select Tabs component from list.

Alternate method:

  1. Click Components tab at top of content tree.
  2. Locate Tabs component.
  3. Drag the Tabs component to any area of the page below the masthead and the Breadcrumb links.

If this is new Tabs content:

  1. In the “Assign content item” dialog box, hover over Data until a “+” appears to the right.
  2. Click “+” and select “Tabs with Tab.”
  3. Give component a unique name and hit enter.
  4. Click Assign.

If using existing Tabs Data (content):

  1. Select Tabs from the list.
  2. Select an existing Tabs in the Data folder.
  3. Click Assign.

The Tabs component and toolbar are displayed.

Screenshot showing how the Tabs component looks when initially placed on the page.
Figure 2: The Tabs component has been placed on the page.

In Pages:

  1. Click the Tabs component to display the toolbar.
  2. In the “Tabs” right column, expand Manage items.
  3. Change Item 1, which is automatically created, as needed:
    1. Rename by clicking “” to the right of the item and giving it a new name.
    2. Delete item by clicking “” to the right of the item and click Delete.
  4. To add a panel:
    1. Click “+ Add new” and click the General Tab button.
    2. Give it a unique name. Hit enter.
    3. Wait for the page to refresh before making additional changes in the Manage items menu.
  5. To rename a panel: click “” to the right of the item and enter a new name.
  6. To delete a panel: click “” to the right of the item and click Delete.
  7. To reorder panels: click “” and use the up and down arrows to change the tab order.

Initially, a Tabs panel appears without a title. The content area contains a “+” button.

Screenshot showing an empty tab panel
Figure 3: The initial appearance of a Tabs tab shows placeholder text for an empty title field and a button to add content.
 
 
 
 

 

  1. In the middle pane, or content pane, add a Tab Title by clicking on the Tab Title field and entering text. The title is the panel Heading. 
  2. In the panel content area below Title, click the purple “+”and select a type of content to add.
  3. Select one of the recommended components from the dialog box. Recommended components include:
    1. Accordion
    2. Image
    3. Mixed Content Grid
    4. MSU Rich Text
    5. Quote Box
    6. Subheading
    7. Text Fact Grid

Alternate method: 

  1. Click Components tab at the top of the content tree.
  2. Drag a component into the Tabs panel placeholder box.

To assign a new component data source to a tab component:

  1. Click “+” to the right of Data.
  2. Give the data source a unique name.
    1. Tip: Include the panel name to more easily match this data source to the correct panel.
  3. Click Assign.

To assign an existing data source to a tab component:

  1. Select the data item.
  2. Click Assign.

Repeat as necessary to add all panels and to add content to all panels. Follow instructions for specific components being added to panels.

  1. Click Tabs component to display toolbar.
  2. Click Explorer icon.

    pages-component-explorer-icon
    Figure 4: The Explorer icon in the Tabs toolbar.
     
     
     
     
  3. In left pane, locate and click the Tabs component.
  4. Locate and click a Tabs panel.

    tabs-in-explorer
    Figure 5: In this example, the first panel of Tabs 1 has been selected for editing.
     
     
     
     
  5. To create a new Tabs panel:
    1. Click “+ Create” in Tabs panel column, select General Tab.
    2. Give it a unique name and click the checkmark icon.
    3. Add content in right pane.
  6. To edit existing Tabs panel:
    1. Click a Tabs item in Tabs panel column.
    2. Change content in right pane.
  7. To delete a Tabs panel:
    1. Click a Tabs item in Tabs panel column.
    2. Click “” in right pane.
    3. Click Delete.
  8. Return to Pages by closing the Explorer browser tab.
  9. Refresh the screen.
  10. Preview and publish the page.
     

Locate the Tabs component:

  1. Open Content Editor:
    1. In Pages, click 9-dot cube icon in upper left.
    2. Select Environment.
    3. Select Content Editor. It opens in a new browser tab.
  2. If the Tabs component does not appear in the content tree, close the page’s Data node and expand it again to refresh the content tree.
  3. In the content tree, expand Content > MSU > sitename > Home > page name > Data.
  4. Locate and expand the Tabs component.

Add a Panel:

  1. Right click the Tabs component.
  2. Select Insert, then select General Tab.
  3. Add content in the main pane on the right side.
Note: New panels can also be created by duplicating an existing panel with the correct content type, then changing the name and content.

Edit an existing panel:

  1. Click and expand the panel in the content tree.
  2. Edit as needed in the main content pane on the right side.

Tips for Using Images:

  • Alt text can be changed in Explorer or Content Editor (Properties link in the Image panel), or when the asset is loaded into Media Library or Content Hub.
  • An image size can be changed in Content Editor > Image > Properties. HTML uses width and height attributes.
  • The image margin (i.e., padding) can be changed in Content Editor > Image > Properties.

Delete a Panel:

  1. Locate and expand the Tabs component.
  2. In the content tree, right click the panel.
  3. Click Delete and confirm.

Delete the Tabs Component:

  1. In the content tree, right click the Tabs component.
  2. Click Delete and confirm.

Publish Changes: 

  1. Return to Pages by closing the Explorer browser tab.
  2. Refresh screen to see changes.
  3. Preview and publish the page.
     

Link to the top of the tab component:

  1. Select the tab component

  2. Navigate to the Advanced styling of the component options in the right-hand pane

  3. Add the desired anchor text to the PAGE ANCHOR ID field (use a short alphanumeric ID name with no spaces or special characters)

  4. Set the link to that tab component by appending the URL of the link with the PAGE ANCHOR ID used on the tab component.

    1. URL format is [site URL]#PAGE ANCHOR ID, for example a link to the Component information tab component on this page would be: https://martech.msu.edu/website-technology/sitecore-cms/xmc-component-guide/tabs#information

Link to a specific tab:

  • At this time, there is not a way to set a link anchor to a specific tab content. This will be a future enhancement.

Tool Use Guide

 PagesExplorerContent Editor
Add componentOptimal  
Add tabsOptimalPossiblePossible
Rename tabsOptimalPossiblePossible
Delete tabsOptimalPossiblePossible
Copy tabs PossiblePossible
Reorder tabsOptimal Possible
Add content to tab*Optimal  

*Add content type and follow component-specific instructions

 

Documentation updated: July 9, 2024