Skip to content

Where tabs work ​

A Tab field works anywhere Statamic shows a list of fields. The rules from Tab rows, nesting & Tabs End are the same everywhere. Each list of fields gets its own tabs: a tab in a Replicator set never reaches outside that set.

PlaceTabs?Notes
Entry, term and global set blueprintsYesPer section.
The sidebarYes
Replicator setsYesEach set has its own tabs and remembers its own selected tab.
Bard setsYesSame as Replicator.
Group fieldsYes
Grid in stacked modeYesEach row has its own tabs.
Grid in table modeNoTab columns are hidden, see below.
FieldsetsYesImported or referenced, see Fieldsets with tabs.

Bard and Replicator sets ​

Add Tab fields to a set's fields. Every set gets its own tab bar, and each set remembers which tab is open, also when you reorder, collapse or add sets. Imported fieldsets work in sets too.

A Bard Call to action set with Content, Button, Style and Advanced tabs. The Button tab is open.A Bard Call to action set with Content, Button, Style and Advanced tabs. The Button tab is open.

A Bard set whose Button, Style and Advanced tabs come from an imported fieldset.
yaml
sets:
  main:
    sets:
      call_to_action:
        display: Call to action
        fields:
          - handle: cta_content_tab
            field: { type: tab, display: Content }
          - handle: heading
            field: { type: text, display: Heading }
          - import: button       # brings Button / Style / Advanced tabs

Grid: stacked vs table ​

In a Grid with mode: stacked, every row shows its fields as a small form, and Tab fields work as usual: each row gets its own tabs.

A Feature list Replicator set with a stacked Grid. Each Grid row has Text and Icon tabs.A Feature list Replicator set with a stacked Grid. Each Grid row has Text and Icon tabs.

A stacked Grid inside a Replicator set. Each row has its own Text / Icon tabs.

In table mode, each field is a table column, so there is nothing for a tab to group. Tab columns are hidden there, and the other columns show normally. Switch the Grid to stacked mode if you want tabs.

A table-mode Grid with Name and Price columns. The Plan tab column is not shown.A table-mode Grid with Name and Price columns. The Plan tab column is not shown.

This Grid has a Tab field. In table mode its column is simply hidden.

Group fields ​

Tab fields inside a Group's fields group those fields. The values are still saved under the Group's handle, as usual (seo.meta_title).

An SEO Group field with Search and Social tabsAn SEO Group field with Search and Social tabs

The sidebar ​

The sidebar is a list of fields like any other, so it can have tabs too. A Tabs End lets you put fields below them.

The sidebar: Slug, then Pricing and Stock tabs, then a Featured product toggle outside the tabsThe sidebar: Slug, then Pricing and Stock tabs, then a Featured product toggle outside the tabs

Global sets ​

Global set blueprints work like entry blueprints.

A Site settings global set with Company, Contact and Social tabsA Site settings global set with Company, Contact and Social tabs

Multisite ​

Tabs follow the site you're editing:

  • Switching between localizations keeps the tabs intact, and the selected tab is remembered per localization.
  • A localization can use a different blueprint than its origin, with different tabs.
  • Tab labels are passed through Statamic's translator, so you can translate them in your lang/*.json files like other strings.
  • Fields that aren't localizable are shown read-only inside their tab, as usual.

The Swedish localization of the product, with the same tabsThe Swedish localization of the product, with the same tabs

Live Preview ​

Opening Live Preview keeps the selected tab, and closing it again too.

Released under the MIT License. Made with fruit by kiwikiwi