Skip to main content
‹ Tabs
Types

Types

The types of tabs.

SectionTabsDraftDocumented, not reviewed yet: the API can change.

TabsElement​

Class

Bottom tabs.

class TabsElement implements LayoutElement<Uses>
MemberTypeDescription
selectedselected(tab: number | string): TabsElement<Uses>

The tab to show first: its index, or its id.

lazylazy(): TabsElement<Uses>

Each tab is created the first time it shows.

itemStyleitemStyle(style: TabItemStyle): TabsElement<Uses>

The look of every tab item; a tab's own goes over it.

minimizeminimize( minimizeBehavior: NonNullable<OptionsBottomTabs['minimizeBehavior']> ): TabsElement<Uses>
iOS 26+iPadOS 26+Android (not supported)
accessoryaccessory<Name extends string, const Props extends object | undefined = undefined>( name: Name, props?: Props ): TabsElement<Uses | { name: Name; props: Props }>

A screen of screens above the tab bar, as the mini player of Apple Music.

iOS 26+iPadOS 26+Android (not supported)
sidebarsidebar( sidebar: NonNullable<OptionsBottomTabs['sidebar']>, sidebarLayout?: OptionsBottomTabs['sidebarLayout'] ): TabsElement<Uses>

How the tabs show on iPad.

iOS 18+iPadOS 18+Android (not supported)
customizablecustomizable(customizationId: string): TabsElement<Uses>

The user arranges the tabs; the id keeps the arrangement.

iOS 18+iPadOS 18+Android (not supported)
customRowcustomRow(customRow: BottomTabsCustomRowOptions): TabsElement<Uses>

The row of tab items drawn by components (bottomTab.component).

backBehaviorbackBehavior(bottomTabsOnPress: 'exit' | 'first' | 'previous'): TabsElement<Uses>

What back does on the first screen of a tab.

iOS (not supported)iPadOS (not supported)Android
iosios(build: (tabs: TabsElement<Uses>) => TabsElement<Uses>): TabsElement<Uses>

Modifiers for iOS only.

androidandroid(build: (tabs: TabsElement<Uses>) => TabsElement<Uses>): TabsElement<Uses>

Modifiers for Android only.

idid(id: string): TabsElement<Uses>

The id of the tabs: the bottomTabsId of the tab events (tabSelected, tabPressed, tabLongPressed), to tell two sets of tabs apart, such as the root's and those of a modal. Without it the id is generated. The commands take the id of a tab (Tab().id()), not this one.

optionsoptions(options: OptionsBottomTabs): TabsElement<Uses>

Options of the tab bar, such as titleDisplayMode. The options of screens go on the screens.

Defined in src/api/layout/Tabs.ts ↗

TabElement​

Class

A tab: a screen named alone gets a stack around it. The tab's item options go on the layout of the tab, not on its first screen: the layout stays in the options a tab reads whatever screen is on top of it.

class TabElement
MemberTypeDescription
labellabel(label: string): TabElement<Uses>
iconicon(icon: ImageResource): TabElement<Uses>
selectedIconselectedIcon(selectedIcon: ImageResource): TabElement<Uses>
iOSiPadOSAndroid (not supported)
badgebadge(badge: string | number | null): TabElement<Uses>

The badge of the tab: a count or a short text. null and the number 0 show none; the text '0' shows "0".

dotdot(dot: boolean | DotIndicatorOptions = true): TabElement<Uses>
rolerole(role: NonNullable<OptionsBottomTab['role']>): TabElement<Uses>
iOSiPadOSAndroid (not supported)
popToRootOnPresspopToRootOnPress(popToRootOnPress = true): TabElement<Uses>

A tap on the tab while it is selected goes back to the first screen of its stack, and on the first screen scrolls it to the top. On by default; false turns it off.

selectOnPressselectOnPress(selectTabOnPress: boolean): TabElement<Uses>

false: a tap does not select the tab, it only sends bottomTabPressed.

onPressonPress(handler: TabPressHandler): TabElement<Uses>

Called on every press of the tab, a second one too (wasSelected). It runs after the native side has acted on the press: with .selectOnPress(false) the tab stays unselected and the handler decides what to do.

popToRootOnBlurpopToRootOnBlur(popToRootOnBlur = true): TabElement<Uses>

When the user leaves the tab, its stack goes back to its first screen, so the tab opens on it next time.

itemStyleitemStyle(style: TabItemStyle): TabElement<Uses>
customizationcustomization( customization: NonNullable<OptionsBottomTab['customization']>, more: Pick<OptionsBottomTab, 'shownByDefault' | 'allowsHiding'> = {} ): TabElement<Uses>

With Tabs().customizable().

iOS 18+iPadOS 18+Android (not supported)
testIDtestID(testID: string): TabElement<Uses>
iosios(build: (tab: TabElement<Uses>) => TabElement<Uses>): TabElement<Uses>

Modifiers for iOS only.

androidandroid(build: (tab: TabElement<Uses>) => TabElement<Uses>): TabElement<Uses>

Modifiers for Android only.

idid(id: string): TabElement<Uses>

The id of the tab, for Tabs().selected() and to address it.

optionsoptions(options: OptionsBottomTab): TabElement<Uses>

Options of the tab item no modifier covers, such as disableIconTint. The options of screens go on the screens.

Defined in src/api/layout/Tabs.ts ↗

TabItemStyle​

Type

The look of a tab item; Tabs().itemStyle() gives it to every tab, a tab's own goes over it.

type TabItemStyle = Pick<
OptionsBottomTab,
| 'iconColor'
| 'selectedIconColor'
| 'textColor'
| 'selectedTextColor'
| 'badgeColor'
| 'fontFamily'
| 'fontStyle'
| 'fontWeight'
| 'fontSize'
| 'selectedFontSize'
| 'iconInsets'
| 'iconWidth'
| 'iconHeight'
| 'disableIconTint'
| 'disableSelectedIconTint'
>
MemberTypeDescription
iconColorColor

The color of the icon. On iOS it is blended into a bitmap icon (an SF Symbol takes the color of the state, and iOS 26 ignores it for an unselected tab). On Android it is the color of an unselected icon over the style of the bar, and null keeps the color of the style. Without it, the icon keeps its own colors on iOS and takes the theme on Android. Use disableIconTint for a multicolor icon.

selectedIconColorColor

The color of the icon of the selected tab; iconColor by default. The theme color primary is its default option.

textColorColor

The color of the label of an unselected tab. On iOS it is the label color by default, and iOS 26 does not apply it to an unselected tab. On Android, without it the theme gives the color.

selectedTextColorColor

The color of the label of the selected tab; the label color on iOS by default. The theme color primary is its default option.

badgeColorColor

The background color of the badge. On iOS before 26 it is the color in the normal state; on iOS 26 it applies to the selected tab only, and the other tabs stay system red. On Android it is the badge color, the error color of the theme by default. The theme color badge is its default option.

fontFamilyFontFamily

The font family of the label.

fontStyleFontStyle

The slant of the label font.

fontWeightFontWeight

The weight of the label font; the nearest available weight is used.

fontSizenumber

The size of the label. On iOS it is 10 by default and applies to both states; on Android it is the size of an unselected label, in sp.

selectedFontSizenumber

The size of the label of the selected tab, in sp.

iOS (not supported)iPadOS (not supported)Android
iconInsetsIconInsets

The insets of the icon. Each side is independent. They apply before iOS 26 only; iOS 26 and the compatibility mode (see backgroundColor) ignore them, and so does a system role before iOS 18.

iOSiPadOSAndroid (not supported)
iconWidthnumber

The width of the icon in dp. The icon is square and the width wins over iconHeight.

iOS (not supported)iPadOS (not supported)Android
iconHeightnumber

The height of the icon in dp, used when no iconWidth is set.

iOS (not supported)iPadOS (not supported)Android
disableIconTintboolean

Whether the icon keeps its own colors in the normal state: iconColor does not apply. On iOS 18+ the system still draws an SF Symbol in the color of the state. On Android the icon of an unselected tab gets no tint, neither from iconColor nor from the style of the bar.

disableSelectedIconTintboolean

Whether the selected icon keeps its own colors: selectedIconColor does not apply (on iOS 18+ a selected SF Symbol takes the tint of the bar). On Android the selected icon gets no tint, neither from selectedIconColor nor from the style of the bar.

Defined in src/api/layout/Tabs.ts ↗

TabPressEvent​

Interface

A press of a tab.

interface TabPressEvent
MemberTypeDescription
indexRequirednumber

The index of the tab.

wasSelectedRequiredboolean

The tab was selected already: a second press, which apps use to scroll to the top.

screenIdstring

The screen the tab shows: the top of its stack.

Defined in src/engine/tabs.ts ↗

TabPressHandler​

Type
type TabPressHandler = (event: TabPressEvent) => void
Defined in src/engine/tabs.ts ↗

TabSelectedEvent​

Type
type TabSelectedEvent = NavigationEvents['tabSelected']
MemberTypeDescription
selectedTabIndexRequirednumber

The index of the tab that is now selected.

unselectedTabIndexRequirednumber

The index of the tab that was selected before.

bottomTabsIdRequiredstring

The id of the tabs.

Defined in src/api/events/navigationEvents.ts ↗

TabPressedEvent​

Type
type TabPressedEvent = NavigationEvents['tabPressed']
MemberTypeDescription
tabIndexRequirednumber

The index of the tab that was pressed.

bottomTabsIdRequiredstring

The id of the tabs.

screenIdstring

The id of the screen the tab shows: the top of its stack, or the tab itself when it is a screen.

wasSelectedRequiredboolean

Whether the tab was the selected one already; a press on the selected tab scrolls its content to the top.

Defined in src/api/events/navigationEvents.ts ↗

TabLongPressedEvent​

Type
type TabLongPressedEvent = NavigationEvents['tabLongPressed']
MemberTypeDescription
selectedTabIndexRequirednumber

The index of the tab that was pressed.

bottomTabsIdRequiredstring

The id of the tabs.

Defined in src/api/events/navigationEvents.ts ↗

AccessoryPlacementChangedEvent​

Type
type AccessoryPlacementChangedEvent = NavigationEvents['accessoryPlacementChanged']
MemberTypeDescription
componentIdRequiredstring

The id of the accessory component (bottomTabs.bottomAccessory.component).

placementRequired'regular' | 'inline'

Where the accessory is: above the tab bar ('regular') or beside the collapsed tab bar ('inline').

Defined in src/api/events/navigationEvents.ts ↗