No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:

  1. Missing Context/Providers: You can use decorators to supply specific contexts or providers, which are sometimes necessary for components to render correctly. For detailed instructions on using decorators, please visit the Decorators documentation.
  2. Misconfigured Webpack or Vite: Verify that Storybook picks up all necessary settings for loaders, plugins, and other relevant parameters. You can find step-by-step guides for configuring Webpack or Vite with Storybook.
  3. Missing Environment Variables: Your Storybook may require specific environment variables to function as intended. You can set up custom environment variables as outlined in the Environment Variables documentation.

This version is no longer actively maintained and has reached End-of-Life (EOL). For new and ongoing projects, please refer to the latest Design System version.

Organize content across different sections that are shown one at a time.

Unua langeto Dua langeto Tria langeto Jen la enhavo de la unua langeto. Defaŭlte ĝi montriĝas komence. Jen la enhavo de la dua langeto. Defaŭlte ĝi estas kaŝita komence. Jen la enhavo de la tria langeto. Defaŭlte ĝi ankaŭ estas kaŝita komence.
<post-tabs> <post-tab-header panel="unua">Unua langeto</post-tab-header> <post-tab-header panel="dua">Dua langeto</post-tab-header> <post-tab-header panel="tria">Tria langeto</post-tab-header> <post-tab-panel name="unua"> Jen la enhavo de la unua langeto. Defaŭlte ĝi montriĝas komence. </post-tab-panel> <post-tab-panel name="dua"> Jen la enhavo de la dua langeto. Defaŭlte ĝi estas kaŝita komence. </post-tab-panel> <post-tab-panel name="tria"> Jen la enhavo de la tria langeto. Defaŭlte ĝi ankaŭ estas kaŝita komence. </post-tab-panel> </post-tabs>
NameDescriptionDefaultControl
props
active-panel

The name of the panel that is initially shown. If not specified, it defaults to the panel associated with the first tab.

Changing this value after initialization has no effect.

string
events
postChange

An event emitted after the active tab changes, when the fade in transition of its associated panel is finished. The payload is the name of the newly shown panel.

string
--
methods
show

Shows the panel with the given name and selects its associated tab. Any other panel that was previously shown becomes hidden and its associated tab is unselected.

show(panelName: string) => Promise<void>
--
slots
default
Slot for placing tab panels. Each tab panel should be a <post-tab-panel> element.
other
--
tabs
Slot for placing tab headers. Each tab header should be a <post-tab-header> element.
other
--
css shadow parts
content
Add custom styles for the tab panel container.
other
--
tabs
Add custom styles for the tab header container.
other
--

The initial selection is set to the first tab by default, displaying its associated panel. To have a different panel displayed initially, use the active-panel property and assign it the name of the desired panel.

Unua langeto Dua langeto Tria langeto Jen la enhavo de la unua langeto. Defaŭlte ĝi montriĝas komence. Jen la enhavo de la dua langeto. Defaŭlte ĝi estas kaŝita komence. Jen la enhavo de la tria langeto. Defaŭlte ĝi ankaŭ estas kaŝita komence.

Use the tabChange event to run a function anytime a new tab gets activate.

const tabs = document.querySelector('post-tabs') as HTMLPostTabsElement; tabs.addEventListener('tabChange', (panelName: string) => { alert(`The panel named ${panelName} is now displayed.`); });

To trigger a tab change, use the show() method specifying the name of the panel that you want to show.

const tabs = document.querySelector('post-tabs') as HTMLPostTabsElement; tabs.show('myPanel');