shadow
TabGroup displays a tab-based navigation that allows users to switch between and view different parts of the application's content without having to navigate to another page. It consists of individual tabs Tab and Panels, which when clicked display the contents of the tab.
The TabGroup element supports multiple appearance variants using the variant attribute.
The Card element has been used only for the purpose of this demonstration.
By adding the variant property it is possible to change the location of the tabs. Supported values are start, end and bottom.
Use wje-tab-group when users need to understand location, move between views, or traverse hierarchy.
Do not combine multiple competing navigation patterns for the same user flow.
Ensure visible active/selected states, predictable tab order, and clear control naming.
- Keep URL state and UI navigation state synchronized.
- Use consistent labels across menu, breadcrumbs, and tabs.
- Add context for deep structures (breadcrumbs, headings, icon cues).
No properties available for this component.
No events available for this component.
| Description | Removes the 'active' class from all panel and tab elements. |
| Signature | () => void |
| Description | Sets the active tab and panel. |
| Signature | (tab: string) => void |
| Description | Returns the currently active tab. |
| Signature | () => Element|null |
| Description | Returns all tabs. |
| Signature | () => Array<Element> |
| Description | Returns all tabs, including those moved to "more". |
| Signature | () => Array<Element> |
| Description | Returns all panels. |
| Signature | () => Array<Element> |
| Description | Returns the names of all tabs. |
| Signature | () => Array<string> |
| Description | Toggles the visibility of the "more" dropdown based on the presence of tabs in the "more" slot. |
| Signature | () => void |
| Description | Initializes metrics for tabs within the component. Assigns each tab to the navigation slot and calculates their dimensions for further operations. |
| Signature | () => void |
| Description | Checks if the tabs within a navigation bar overflow the available space. Moves overflowing tabs into a dropdown menu and updates their state accordingly. |
| Signature | () => void |
| Description | Toggles the "dropdown-active" class on the element based on its "active" status and the value of its "slot" attribute. |
| Signature | (el: HTMLElement) => void |
No CSS shadow parts available for this component.
| Name | Description |
|---|
--wje-tab-group-padding | Specifies the padding inside the tab group. This property defines the space between the content of the tab group and its outer boundary. Accepts any valid CSS length unit (e.g., px, rem, em, %). |
| Name | Description |
|---|
default | The default slot for the tab group. |
nav | Slot for the navigation of the tab group. |