Content tabs

Content tabs group several titled panels of content into one block that shows a single panel at a time. They suit content that comes in variants (such as installation steps for each operating system or the same snippet in several programming languages).

A tabs block consists of:

  • A single row of tab titles, above the panel or, when the tabs are aligned at the bottom, below it. The title of the panel that is showing is highlighted.
  • The panel of the active tab. A panel can hold any kind of content (including nested tabs blocks).

Inserting a tabs block

  • In the formatting bar, go to Insert → Tabs.
  • Alternatively, type /tabs and press Enter, as described in Slash Commands.

A new block contains two tabs, named “Tab 1” and “Tab 2”. Any content that was selected prior to inserting the tabs will be moved into the first tab. The title of the first tab is selected, so typing replaces it.

Scrolling through the titles

When the titles of a block do not fit on their row, a button and a button appear at its ends:

  • To scroll the titles, click one of the buttons. Holding a button down scrolls the titles continuously until it is released.
  • On a touch screen, the titles can also be swiped sideways.

Whenever another tab is shown (for example by clicking its title, by moving the cursor into it or by following a link to it), the row scrolls so that its whole title is visible. This works the same while editing, in read-only notes and on shared pages.

Editing tabs

  • To show a tab, click its title or move the cursor into it.
  • To move from a title into its panel, press Enter.
  • The label of a tab can be formatted just like normal text, including support for Icons.

While the cursor is inside a tabs block, a toolbar appears above it with the following buttons:

  •  (Add tab) inserts a tab after the current one and selects its title.
  •  (Remove tab) removes the current tab. Removing the last tab removes the whole block.
  •  (Move tab left) and  (Move tab right) change the order of the tabs.
  •  (More actions) opens a menu with the actions of the toolbar and a few more.

The  More actions menu has the following entries:

  • Add new tab inserts a tab after the current one, like the  button.
  • Copy reference to this tab copies a link to the current tab, as described below.
  • Move tab right and Move tab left change the order of the tabs.
  • Tab alignment places the tab titles above the panel (Align tabs at top, the default) or below it (Align tabs at bottom).
  • Delete tab removes the current tab, like the  button.
  • Delete all tabs removes the whole tabs block and leaves an empty paragraph in its place. In a tabs block nested inside another, only the inner block is removed.

The tab that is showing is not saved with the note: every tabs block opens on its first tab.

Adding tabs

While the cursor is in a tab, either in its title or in its panel, you can use these key combinations:

  • Ctrl + Enter: Add a tab after the current one.
  • Ctrl + Shift + Enter: Add a tab before the current one.

The new tab is shown and its title is selected, so typing replaces it.

Ctrl + Enter keeps its usual function on a link, in a to-do item and in the title of a collapsible block, and Ctrl + Shift + Enter in a to-do item.

Reordering tabs

While the cursor is in a tab, either in its title or in its panel, you can use these key combinations:

  • Ctrl + Alt + Right: Move the tab to the right.
  • Ctrl + Alt + Left: Move the tab to the left.
  • Ctrl + Alt + Home: Make it the first tab.
  • Ctrl + Alt + End: Make it the last tab.

Moving content between tabs

To move content to another tab, select it in the panel, and then use these key combinations:

  • Ctrl + Right: Move to the tab on the right.
  • Ctrl + Left: Move to the tab on the left.
  • Ctrl + Shift + End: Move to the last tab.
  • Ctrl + Shift + Home: Move to the first tab.

The tab that receives the content is shown, with the content still selected, so pressing the key again moves it on to the next tab. Paragraphs, list items, tables and other blocks move whole, even when only part of them is selected. Content moved to a tab on the left goes to the end of that tab, and content moved to a tab on the right goes to its start, so it keeps its place in the reading order.

Without a selection, or with a selection in a tab title, these keys keep their usual function: moving the cursor by word, or selecting up to the start or end of the tab.

When a tabs block and a Multicolumn layout are nested in one another, the key combinations act on the one closest to the cursor.

Reading tabs

In Read-Only Notes and on Sharing, tabs blocks work as tabs as well:

  • To show a tab, click its title, or focus it and press Enter or Space.
  • To move between the titles of a block, use the arrow keys, Home and End.

A tab without a title shows “Tab title” in place of one.

In read-only notes, a title too long for its tab fades out where it is cut off. To read the rest of it, swipe it sideways or drag it with the mouse.

Linking to a tab

A link can point to a single tab, much like a link to a block (see Block references):

  1. Place the cursor in the tab, either in its title or in its panel.
  2. In the toolbar of the tabs block, open the  More actions menu and select Copy reference to this tab. Alternatively, right-click the text and select Copy → Copy link to this tab. The tab flashes briefly.
  3. Go to the note where to insert the link and press Ctrl+V.

The link shows the title of the note, followed by the title of the tab. Clicking it opens the note, shows the tab and flashes it. As with any block reference, the link can be turned into an Include Note that shows only that tab.

Links to a tab can be copied only from a note being edited. On a shared page, such a link opens the whole note.

Content in hidden tabs

Content inside a tab that is not showing is still reachable (both while editing and while reading). The tab that holds it is shown when:

  • searching the note with Ctrl+F highlights a match inside it;
  • a link points to an anchor or a block inside it (see Anchors and Block references);
  • an entry of the Table of contents or the Highlights list points inside it;
  • on a shared page, the address of the page points to a heading or an anchor inside it.

Tab titles are not headings, so they do not appear in the table of contents; headings inside a panel do.

Printing and exporting

  • When printing or exporting to PDF, every tab is printed, one after another, each with its title above its panel, whatever the tab alignment.
  • Markdown export and import write tabs blocks in the content tabs syntax of Material for MkDocs, described in Supported syntax. Markdown notes use the same syntax, show the blocks as tabs in their preview and insert them with /tabs. That syntax has no tab alignment, so tabs aligned at the bottom are exported as regular tabs.
  • Anywhere the tabs cannot work as tabs (such as an HTML export opened elsewhere), a tabs block reads as a sequence of titled sections.