Live demo
Demo source
Use a tab item for one view inside Tabs. The parent owns selection and keyboard navigation; the item supplies its label, identity, panel relationship and optional supporting content.
Anatomy
The Tabs anatomy shows the item, leading icon, label, notification, trailing icon, active underline and shared separator. Follow the parent guidance for the whole tab strip and its panels.
Usage
- Give each item a unique
value, a visiblelabel, and apanelId. - Set the group's
valueto select a view. The item has no selected property; the container suppliesaria-selectedand its tab stop. - Render a panel with an ID matching
panelId,role="tabpanel"andaria-labelledbypointing to the tab's ID. Set an explicit tabidwhen composing that relationship. - Keep the panel visible only while its view is selected. Use the parent's
valueChangedevent and the same state for programmatic changes. - Set
disabledfor an unavailable view. It remains visible, cannot be selected and is skipped during keyboard navigation.
leadingIcon and trailingIcon are decorative cues. A notification count
appears from 1; translate notificationLabel with {count} to describe it
without changing the view's name. Keep labels concise and use the parent's
showSeparator for the optional full-width baseline.