Types
All exported TypeScript types from reanimated-tab-view.
import type {
Route,
NavigationState,
Layout,
SceneRendererProps,
HeaderRendererProps,
TabViewProps,
TabViewMethods,
TabBarConfig,
TabBarProps,
TabContentProps,
RenderMode,
JumpMode,
TabBarType,
TabBarPosition,
KeyboardDismissMode,
} from 'reanimated-tab-view';
Route
Describes a single tab route.
type Route = {
key: string;
title?: string;
accessible?: boolean;
accessibilityLabel?: string;
testID?: string;
};
NavigationState
The state object passed to TabView via the navigationState prop.
type NavigationState = {
index: number;
routes: Route[];
};
Layout
Describes width and height dimensions.
type Layout = {
width: number;
height: number;
};
SceneRendererProps
Props passed to the renderScene callback.
type SceneRendererProps = {
route: Route;
};
HeaderRendererProps
Props passed to the renderHeader callback.
type HeaderRendererProps = {
collapsedPercentage: SharedValue<number>;
collapsedHeaderHeight: SharedValue<number>;
};
TabViewProps
Full props type for the TabView component. See TabView API for details.
TabViewMethods
Methods available via the TabView ref.
type TabViewMethods = {
jumpTo: (routeKey: string) => void;
};
TabBarConfig
Configuration for the tab bar passed via tabBarConfig. See TabView API for details.
TabBarProps
Props for the TabBar component. See TabBar API for details.
TabContentProps
Props passed to custom tab content renderers.
type TabContentProps = Omit<ViewProps, 'children'> & {
activePercentage: SharedValue<number>;
label?: string;
activeColor?: string;
inactiveColor?: string;
labelStyle?: StyleProp<TextStyle>;
};
Enum types
RenderMode
type RenderMode = 'all' | 'windowed' | 'lazy';
JumpMode
type JumpMode = 'smooth' | 'scrolling' | 'no-animation';
TabBarType
type TabBarType = 'primary' | 'secondary';
TabBarPosition
type TabBarPosition = 'top' | 'bottom';
KeyboardDismissMode
type KeyboardDismissMode = 'none' | 'on-drag' | 'auto';