import React from "react"; import { ViewProps, StyleProp, ViewStyle, TextStyle, ScrollViewProps, LayoutChangeEvent } from "react-native"; import type { SharedValue } from "react-native-reanimated"; export interface TabItem { /** Stable identity used for React keys and pager state when tabs reorder */ key?: string | number; /** Alternative stable identity used when `key` is not provided */ id?: string | number; name: string; component: (props: TabPageProps) => React.ReactNode; [key: string]: unknown; } export interface TabPageProps { item: TabItem; index: number; width?: number; isActive: SharedValue; } /** Props handed to a custom `renderTabItem` function */ export interface TopTabItemRenderProps { item: TabItem; index: number; title: string; isActive: SharedValue; /** Call this to trigger tab navigation */ onPress: () => void; /** Attach this to the item's root so the indicator knows the layout */ onLayout: (e: LayoutChangeEvent) => void; } export interface TopTabsProps extends ViewProps { tabs: TabItem[]; width?: number; /** Extra style merged on top of the outer container */ containerStyle?: StyleProp; /** Background color of the tab bar */ backgroundColor?: string; /** Extra style for the horizontal ScrollView */ scrollViewStyle?: StyleProp; /** Additional ScrollView props (decelerationRate, bounces, …) */ scrollViewProps?: Partial; /** Style applied to every tab item's animated wrapper */ tabItemStyle?: StyleProp; /** Style applied to every tab item's text label */ tabTextStyle?: StyleProp; /** Background color when a tab is active */ activeColor?: string; /** Background color when a tab is inactive */ inactiveColor?: string; /** Opacity when a tab is fully active (default 1) */ activeOpacity?: number; /** Opacity when a tab is fully inactive (default 0.5) */ inactiveOpacity?: number; /** Fully custom tab‑item renderer (receives helpers for onPress/onLayout) */ renderTabItem?: (props: TopTabItemRenderProps) => React.ReactElement; /** Extra style merged onto the indicator view */ indicatorStyle?: StyleProp; /** Indicator width (default 50) */ indicatorWidth?: number; /** Indicator height (default 4) */ indicatorHeight?: number; /** Indicator color (default 'white') */ indicatorColor?: string; /** Set false to hide the indicator entirely */ showIndicator?: boolean; /** Border radius of the indicator (default 0) */ indicatorBorderRadius?: number; /** Opacity of the indicator (0–1, default 1) */ indicatorOpacity?: number; /** Position of the indicator relative to tab items ('top' | 'bottom', default 'bottom') */ indicatorPosition?: "top" | "bottom"; /** Horizontal alignment of the indicator within each tab item ('left' | 'center' | 'right', default 'center') */ indicatorAlign?: "left" | "center" | "right"; /** Top margin of the indicator */ indicatorMarginTop?: number; /** Bottom margin of the indicator */ indicatorMarginBottom?: number; /** Horizontal margin of the indicator */ indicatorMarginHorizontal?: number; /** Disable the Reanimated layout transition animation on the indicator */ indicatorDisableLayoutTransition?: boolean; /** Fully custom indicator renderer */ renderIndicator?: () => React.ReactElement; } declare const TopTabs: React.FC; export default TopTabs; export { useTopTabsContext } from "./TopTabsContext"; export type { TopTabsStyleConfig, TopTabsContextType } from "./TopTabsContext"; //# sourceMappingURL=TopTabs.d.ts.map