Skip to content

API reference

Every <Tabs.Container> prop and ref method, in one place.

The full <Tabs.Container> surface. Each prop also has its own focused page under the sections above — this is the flat reference.

Imperative ref

useRef<CollapsingTabsRef> exposes: jumpToTab(name, animated?), setIndex(index, animated?), getFocusedTab(), getCurrentIndex(), scrollToTop(animated?), scrollAllToTop().

Note · Web is not supported (react-native-pager-view is native-only).

Reference

renderHeader () => ReactNode

Collapsible header. Omit for a plain pinned tab bar. Height is measured automatically.

renderTabBar (props) => ReactNode · default DefaultTabBar

Custom tab bar.

minHeaderHeight number · default 0

Header px that stays visible when fully collapsed (e.g. safe-area top).

headerBackgroundColor string · default '#fff'

Solid backing behind header + tab bar.

initialTabName string · default first tab

Tab to focus on mount.

lazy boolean · default false

Mount tab content on first focus. Tapping a far tab mounts only the destination.

revealHeaderOnScroll boolean · default false

Any upward scroll reveals the header immediately (Twitter-style).

snapThreshold number | null · default null

When set (0..1), a header released mid-collapse animates fully open or closed.

windowConfig { ahead, behind }

Cap mounted tabs to the focused tab ± window; the rest hide via <Activity>. Needs React 19.2+.

onIndexChange (index) => void

Fires when a tab switch settles.

onTabChange ({ prevIndex, index, ... }) => void

Same timing, richer payload. Never fires for intermediate pages.

headerContainerStyle StyleProp<ViewStyle>

Extra styles on the animated header wrapper.

containerStyle StyleProp<ViewStyle>

Styles for the outer container.

pagerProps PagerView props

Escape hatch to the underlying pager (keyboardDismissMode, overdrag, …).