Lynx/Modules/Navigation
@sigx/lynx-navigation · Stable

Navigation#

A type-first native navigator for SignalX Lynx — Stack, Tabs, Drawer, modals, lazy routes and deep links, with platform-correct transitions.

48k weekly v0.4.1 iOS · Android MIT

Installation#

Terminal
pnpm add @sigx/lynx-navigation

Define your routes#

Routes are plain typed objects — params infer end-to-end, so navigate() autocompletes both route names and their params.

TSX
import { createNavigator, Stack } from '@sigx/lynx-navigation';

export const nav = createNavigator({
    home: { screen: HomeScreen },
    profile: { screen: ProfileScreen, params: {} as { userId: string } },
});

export const App = () => <Stack navigator={nav} initial="home" />;
TSX
import { useNavigation } from '@sigx/lynx-navigation';

const { navigate, back } = useNavigation<typeof nav>();

navigate('profile', { userId: '42' });   // fully typed
  • Stack — push/pop with native transitions and gestures
  • Tabs — bottom tabs with badges and lazy screens
  • Drawer — slide-in menu, gesture-driven
  • Modalspresent() / dismiss() on any navigator

Map URL patterns to routes once; cold-start and runtime links both resolve through the same table.

TSX
nav.linking({ 'app://profile/:userId': 'profile' });

Next steps#

See Usage for nesting navigators and guards, or the API reference.