API reference
Imperative ref
Navigate to a tab from a parent component.
Type: TabsRef. View library source.
Create the ref with useRef<TabsRef>(null) and pass it to Tabs.Container. The component must be mounted before calling its methods.
setIndex
Required
(index: number, animated?: boolean) => voidMove to a tab, animated by default. Indices round and clamp; non-finite values select 0. Reports through onIndexChange.
getIndex
Required
() => numberCurrent selected target index, even while its animation is settling.