Types
Every type below is exported from guideway.
TourDefinition
Section titled “TourDefinition”interface TourDefinition { id: string; steps: StepDefinition[]; showOnce?: boolean; // auto-start once per install (needs `storage`) onComplete?: () => void; onSkip?: (atIndex: number) => void;}StepDefinition
Section titled “StepDefinition”interface StepDefinition { id: string; // must match a useTourTarget(id) title?: string; body?: string | ReactNode; placement?: 'top' | 'bottom' | 'left' | 'right' | 'auto'; // default 'bottom' cutout?: Cutout; // per-step spotlight shape render?: TooltipComponent; // per-step custom tooltip}Cutout
Section titled “Cutout”interface Cutout { shape?: 'rect' | 'rounded' | 'circle' | 'pill'; padding?: number; // extra space around the target, in px radius?: number; // corner radius for shape 'rounded' (default 8)}GuidewayTheme and ThemeOverride
Section titled “GuidewayTheme and ThemeOverride”ThemeOverride is what you pass to the provider’s theme prop; it is deep-merged over the chosen light or dark base.
interface GuidewayTheme { overlayColor: string; // scrim color (include opacity in the rgba) accent: string; // primary button color tooltip: { backgroundColor: string; textColor: string; titleColor: string; borderRadius: number; padding: number; maxWidth: number; fontFamily?: string; }; labels: { next: string; back: string; skip: string; done: string };}
interface ThemeOverride { overlayColor?: string; accent?: string; tooltip?: Partial<GuidewayTheme['tooltip']>; labels?: Partial<GuidewayTheme['labels']>;}Guideway also exports lightTheme, darkTheme, and resolveTheme(scheme, override). See Theming.
TooltipRenderProps
Section titled “TooltipRenderProps”The full contract handed to a custom tooltip (a step’s render, or the provider’s tooltipComponent):
interface TooltipRenderProps { step: StepDefinition; stepIndex: number; totalSteps: number; progress: number; isFirst: boolean; isLast: boolean; next: () => void; back: () => void; skip: () => void; stop: () => void;}TourStorage
Section titled “TourStorage”A pluggable adapter for showOnce persistence. It matches the shape of AsyncStorage and MMKV, and tolerates sync or async implementations.
interface TourStorage { getItem(key: string): Promise<string | null> | string | null; setItem(key: string, value: string): Promise<void> | void; removeItem?(key: string): Promise<void> | void;}UseTourTargetOptions
Section titled “UseTourTargetOptions”interface UseTourTargetOptions { scrollRef?: RefObject<ScrollView | FlatList>; index?: number; enabled?: boolean;}Insets
Section titled “Insets”interface Insets { top: number; right: number; bottom: number; left: number;}