Tab (tab)

Tabs organize content across different screens, data sets, and other interactions.

🔗 External documentation.

ID Label Description Schema
text Text The tab text
icon Icon Icon list in https://fonts.google.com/icons?selected=Material+Icons
                        type: string

                      
            id: tab
label: Tab
description: 'Tabs organize content across different screens, data sets, and other interactions. '
group: Tabs
homepage: 'https://m2.material.io/components/tabs/web'
variants:
    default:
        id: default
        label: Default
    active:
        id: active
        label: Active
slots:
    text:
        id: text
        label: Text
        description: 'The tab text'
props:
    icon:
        id: icon
        label: Icon
        description: 'Icon list in https://fonts.google.com/icons?selected=Material+Icons'
        schema:
            type: string
library:
    dependencies:
        - material_icons
    id: tab
examples:
    preview:
        id: preview
        label: Preview
        renderable:
            '@component': tab
            text: Favourites
            icon: search

          

Default ( default )

Favourites
<span aria-selected="true" class="mdc-tab" role="tab" tabindex="0"> <span class="mdc-tab__content"> <span class="mdc-tab__icon material-icons" aria-hidden="true">search</span> <span class="mdc-tab__text-label">Favourites</span> </span> <span class="mdc-tab-indicator"> <span class="mdc-tab-indicator__content mdc-tab-indicator__content--underline"></span> </span> <span class="mdc-tab__ripple"></span> </span>

Active ( active )

Favourites
<span aria-selected="true" class="mdc-tab--active mdc-tab" role="tab" tabindex="0"> <span class="mdc-tab__content"> <span class="mdc-tab__icon material-icons" aria-hidden="true">search</span> <span class="mdc-tab__text-label">Favourites</span> </span> <span class="mdc-tab-indicator mdc-tab-indicator--active"> <span class="mdc-tab-indicator__content mdc-tab-indicator__content--underline"></span> </span> <span class="mdc-tab__ripple"></span> </span>