Dark Light
System
Default LBBW Jira Confluence Source Code
Share
Playground

Tab Group

<afp-tab-group> Since 1.0.0 stable This component uses the light DOM, so its markup and styles are part of the regular document flow.

A tab group component to organize related content. Can switch between labeled tabs to reveal associated panels.

Overview Settings Advanced New Disabled This is the overview panel where basic information is displayed. This panel contains customizable settings for your configuration. Advanced options and developer-level settings appear here. This tab is disabled and cannot be selected.

Examples #

Placements #

Use the placement attribute to change the placement of the tabs.

Bottom #

Use placement="bottom" to position the tabs below the tab panels.

Profile Preferences Security Billing Manage your personal information and avatar settings here. Configure language, theme, and notification options. Update your password, MFA options, and security logs. View invoices, payment methods, and subscription details.

Left #

Use placement="left" to position the tabs to the left of the tab panels.

Overview Datasets Import Export A summary of available data and recent activity. Browse and manage all datasets in the system. Upload new data files or connect external sources. Download datasets in various formats.

Use placement="right" to position the tabs to the right of the tab panels.

Appearance Behavior Events Accessibility Change colors, spacing, and typography settings. Configure interaction rules, animations, and state logic. Manage event callbacks and custom handlers. Adjust ARIA labels and keyboard navigation options.

Scroll controls #

Use the noScrollControls attribute to disable the arrows that appear when there is not enough space. The overflow will only be reachable with keyboard inputs.

With scroll controls #

Automatic scroll controls will appear when there are more tabs than can fit in the available space.

Overview General Appearance Notifications Privacy Security Billing Integrations API Automation Logs Support A quick summary of your application settings and recent changes. Configure basic app settings, language preferences, and metadata. Customize themes, typography, and layout options. Manage email, push, and in-app notification preferences. Control data sharing, tracking options, and permissions. Set up authentication, MFA, sessions, and access policies. View invoices, subscriptions, and payment details. Connect external services and manage integration settings. Manage API keys, rate limits, and developer documentation. Configure workflows, rules, and scheduled tasks. Access system logs, audit trails, and error reports. Contact support, view help articles, or request assistance.

Without scroll controls #

Use the noScrollControls (noscrollcontrols) attribute to disable the scroll controls.

Overview General Appearance Notifications Privacy Security Billing Integrations API Automation Logs Support A quick summary of your application settings and recent changes. Configure basic app settings, language preferences, and metadata. Customize themes, typography, and layout options. Manage email, push, and in-app notification preferences. Control data sharing, tracking options, and permissions. Set up authentication, MFA, sessions, and access policies. View invoices, subscriptions, and payment details. Connect external services and manage integration settings. Manage API keys, rate limits, and developer documentation. Configure workflows, rules, and scheduled tasks. Access system logs, audit trails, and error reports. Contact support, view help articles, or request assistance.

Properties

Learn more about properties.

Name Description Reflects
placement
The placement of the tabs.
Type
TabGroupPlacement
Name Description
LEFT
Left placement of the tab group.
RIGHT
Right placement of the tab group.
TOP
Top placement of the tab group.
BOTTOM
Bottom placement of the tab group.
TabGroupPlacement
Default TabGroupPlacement.TOP
noScrollControls
noscrollcontrols
Disables the scroll arrows that appear when tabs overflow.
Type boolean
Default false

Methods

Learn more about using methods.

Name Description Arguments
show
Activates and displays the tab associated with the specified panel. This method finds the tab that corresponds to the provided panel identifier and sets it as the active tab. If a matching tab is found, it becomes the active tab, and its content is displayed.
Return void
panel<string> — The identifier of the panel to be shown, which is associated with a tab.

Events

Learn more about events.

Name Return Description
afp-hide string
Emitted when a tab is hidden.
afp-show string
Emitted when a tab is shown.

Slots

Learn more about slots.

Name Description
nav
Slot for adding custom content into the tab navigation
default
Default slot for adding tab panel content into the tab group bod

CSS Parts

Learn more about CSS Parts.

Name Description Selector
base
The container for the tab group
::part(base)
container
The container for the navigation area
::part(container)
nav
The navigation area of the tab group
::part(nav)
tabs
The container for the tabs(list)
::part(tabs)
active-tab-indicator
The indicator that shows the active tab
::part(active-tab-indicator)
indicator
The indicator that shows the active tab
::part(indicator)
scroll-button-left
The left scroll button
::part(scroll-button-left)
scroll-button-right
The right scroll button
::part(scroll-button-right)
body
The container for the tab content
::part(body)

CSS Custom Properties

Name Description Default
--afp-tab-group-active-track-color
The color of the active tab indicator
--afp-color-link
--afp-tab-group-control-size
The size of the tab group scroll controls
--afp-font-size-m
--afp-tab-group-border-width
The border width of the tab group
--afp-border-width-m

Dependencies

The component automatically brings in the listed items, including any nested dependencies that may exist.

afp-icon

Importing

Using the bundle is the recommended method to include components. If you’d rather handle imports manually, you can use the code examples below.

import '@afp-design-system/core/dist/components/tab-group/tab-group.js';
Share
Create a link with a predefined theme that is automatically applied when the generated link is opened. Default LBBW Presentation Mode
Abort Copy Link