Tabs and tab variants
Tabs let you group sections of your documentation together, while tab variants allow you to display different content perspectives within a single tab.
Tabs
Add tabs to group sections together. The example below shows tabs for Help Center, API Reference, and an external link to Github. Each tab has a display-name and icon.
In the navigation section, each tab reference must include either a layout (for content) or variants (for tab variants). Tabs with an href property are external links and must not include layout or variants.
Tab icons
Icons can be in three formats:
- Font Awesome icons: Use icon names like
fa-solid fa-rocket. Pro and Brand Icons from Font Awesome are supported. - Custom image files: Use relative paths to image files (e.g.,
./assets/icons/my-icon.svgor../assets/icons/my-icon.png). Paths are relative to the YAML file where the icon is referenced (e.g.,docs.yml). For example, if you set an icon infern/products/my-product.yml, the path./assets/icon.svgresolves tofern/products/assets/icon.svg. If you set it infern/docs.yml, the same path resolves tofern/assets/icon.svg. - Inline SVG: Provide an SVG string wrapped in quotes (e.g.,
"<svg>...</svg>").
Here’s an example of how a tabs implementation renders:

Tabs placement and styling
Tabs display in the left sidebar by default. Use theme.tabs to control placement, style, and alignment.
Tab properties
display-name
The name shown in the tab header
icon
Icons can be in three formats:
- Font Awesome icons: Use icon names like
fa-solid fa-rocket. Pro and Brand Icons from Font Awesome are supported. - Custom image files: Use relative paths to image files (e.g.,
./assets/icons/my-icon.svgor../assets/icons/my-icon.png). Paths are relative to the YAML file where the icon is referenced (e.g.,docs.yml). For example, if you set an icon infern/products/my-product.yml, the path./assets/icon.svgresolves tofern/products/assets/icon.svg. If you set it infern/docs.yml, the same path resolves tofern/assets/icon.svg. - Inline SVG: Provide an SVG string wrapped in quotes (e.g.,
"<svg>...</svg>").
slug
Custom URL slug for the tab
skip-slug
Exclude the tab slug from URLs
hidden
Hide the tab from navigation. See Hiding content for details.
layout
Navigation structure for the tab’s content. Required unless the tab uses variants or href.
variants
List of tab variants for displaying different content perspectives. Use instead of layout.
href
External URL. When set, clicking the tab redirects to this URL. Tabs with href must not include layout or variants.
target
Where the link opens. One of _blank, _self, _parent, or _top.
changelog
Path to a changelog folder, relative to the YAML file where it is set (e.g., docs.yml)
viewers
Role-based access control for the tab
orphaned
When true, roles don’t inherit from parent elements
feature-flag
Conditional display configuration
Tab variants
Tab variants let you display different content variations within a single tab, and support RBAC. This is useful for showing different user types, implementation approaches, or experience levels without creating separate tabs.
When to use variants vs. tabs
Use variants for different perspectives on the same content area (REST vs. GraphQL, beginner vs. advanced). Use tabs for completely different documentation sections (guides vs. API Reference).
Basic usage
Define a tab with a variants property instead of a layout property. Each variant has its own title and layout. The example below shows two variants for the Help Center tab.
Variant properties
title
Display name for the variant
layout
Navigation structure using the same format as regular tab layouts
subtitle
Text displayed below the variant title
icon
Icons can be in three formats:
- Font Awesome icons: Use icon names like
fa-solid fa-rocket. Pro and Brand Icons from Font Awesome are supported. - Custom image files: Use relative paths to image files (e.g.,
./assets/icons/my-icon.svgor../assets/icons/my-icon.png). Paths are relative to the YAML file where the icon is referenced (e.g.,docs.yml). For example, if you set an icon infern/products/my-product.yml, the path./assets/icon.svgresolves tofern/products/assets/icon.svg. If you set it infern/docs.yml, the same path resolves tofern/assets/icon.svg. - Inline SVG: Provide an SVG string wrapped in quotes (e.g.,
"<svg>...</svg>").
slug
Custom URL slug for the variant
skip-slug
Exclude the variant slug from URLs
hidden
Hide the variant from navigation. See Hiding content for details.
default
When true, this variant displays by default. If not specified, the first variant in the list is used.
viewers
Role-based access control for the variant
orphaned
When true, roles don’t inherit from parent elements
feature-flag
Conditional display configuration