Expo Router
A file-based routing library for React Native and web applications.
expo-router is a routing library for React Native and web apps. It enables navigation management using a file-based routing system and provides native navigation components and is built on top of React Navigation.
Learn about Expo Router basics, navigation patterns, core concepts, and more.
Installation
To use Expo Router in your project, you need to install. Follow the instructions from the Expo Router's installation guide:
Learn how to install Expo Router in your project.
Configuration in app config
If you are using the default template to create a new project, expo-router's config plugin is already configured in your app config.
Example app.json with config plugin
{ "expo": { "plugins": ["expo-router"] } }
Configurable properties
| Name | Default | Description |
|---|---|---|
root | "app" | Changes the routes directory from |
origin | undefined | Production origin URL where assets in the public folder are hosted. The fetch function is polyfilled to support relative requests from this origin in production. The development origin is inferred using the Expo CLI development server. |
headOrigin | undefined | A more specific origin URL used in the |
asyncRoutes | undefined | Enable async routes (lazy loading). Can be a boolean, a string ( |
platformRoutes | true | Enable or disable platform-specific routes (for example, index.android.tsx and index.ios.tsx). |
sitemap | true | Enable or disable the automatically generated sitemap at /_sitemap. |
partialRouteTypes | true | Enable partial typed routes generation. This allows TypeScript to provide type checking for routes without requiring all routes to be statically known. |
redirects | undefined | An array of static redirect rules. Each rule should have |
rewrites | undefined | An array of static rewrite rules. Each rule should have |
headers | undefined | A list of headers that are set on every route response from the server. The value can be a string or an array of strings. |
disableSynchronousScreensUpdates | false | Disable synchronous layout updates for native screens. This can help with performance in some cases. |
unstable_useServerMiddleware | false | Experimental  • Enable server middleware support with a |
unstable_useServerDataLoaders | false | Experimental  • Enable data loader support. This is only supported for |
unstable_useServerRendering | false | Experimental  • Enable server-side rendering. When enabled with |
Usage
For information core concepts, notation patterns, navigation layouts, and common navigation patterns, start with Router 101 section:
API
import { Stack, Tabs, Link } from 'expo-router';
Components
Type: React.Element<LinkProps>
Component that renders a link using href to another route.
By default, it accepts children and wraps them in a <Text> component.
Uses an anchor tag (<a>) on web and performs a client-side navigation to preserve
the state of the website and navigate faster. The web-only attributes such as target,
rel, and download are supported and passed to the anchor tag on web. See
WebAnchorProps for more details.
Note: Client-side navigation works with both single-page apps, and static-rendering.
Example
import { Link } from 'expo-router'; import { View } from 'react-native'; export default function Route() { return ( <View> <Link href="/about">About</Link> </View> ); }
booleanUsed to customize the Link component. It will forward all props to the
first child of the Link. Note that the child component must accept
onPress or onClick props. The href and role are also
passed to the child.
Example
import { Link } from 'expo-router'; import { Pressable, Text } from 'react-native'; export default function Route() { return ( <View> <Link href="/home" asChild> <Pressable> <Text>Home</Text> </Pressable> </Link> </View> ); }
stringOn native, this can be used with CSS interop tools like Nativewind.
On web, this sets the HTML class directly.
SingularOptionsWhen navigating in a Stack, if the target is valid then screens in the history that matches the uniqueness constraint will be removed.
If used with push, the history will be filtered even if no navigation occurs.
booleanWhile in a stack, this will dismiss screens until the provided href is reached. If the href is not found,
it will instead replace the current screen with the provided href.
Example
import { Link } from 'expo-router'; import { View } from 'react-native'; export default function Route() { return ( <View> <Link dismissTo href="/feed">Close modal</Link> </View> ); }
unionThe path of the route to navigate to. It can either be:
- string: A full path like
/profile/settingsor a relative path like../settings. - object: An object with a
pathnameand optionalparams. Thepathnamecan be a full path like/profile/settingsor a relative path like../settings. The params can be an object of key-value pairs.
Example
import { Link } from 'expo-router'; import { View } from 'react-native'; export default function Route() { return ( <View> <Link href="/about">About</Link> <Link href={{ pathname: '/user/[id]', params: { id: 'bacon' } }}> View user </Link> </View> ); }
Acceptable values are: string | HrefObject
(event: MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => voidThis function is called on press. Text intrinsically supports press handling with a default highlight state (which can be disabled with suppressHighlighting).
booleanPrefetches the route when the component is rendered on a focused screen.
booleanAlways pushes a new route, and never pops or replaces to existing route. You can push the current route multiple times or with new parameters.
Example
import { Link } from 'expo-router'; import { View } from 'react-native'; export default function Route() { return ( <View> <Link push href="/feed">Login</Link> </View> ); }
booleanRelative URL references are either relative to the directory or the document. By default, relative paths are relative to the document.
booleanRemoves the current route from the history and replace it with the specified URL. This is useful for redirects.
Example
import { Link } from 'expo-router'; import { View } from 'react-native'; export default function Route() { return ( <View> <Link replace href="/feed">Login</Link> </View> ); }
booleanReplaces the initial screen with the current route.
Inherited Props
Omit<TextProps, 'href'>WebAnchorProps
Type: React.Element<BadgeProps>
Type: React.Element<ErrorBoundaryProps>
Type: React.Element<LabelProps>
Type: React.Element<RedirectProps>
Redirects to the href as soon as the component is mounted.
Example
import { View, Text } from 'react-native'; import { Redirect } from 'expo-router'; export default function Page() { const { user } = useAuth(); if (!user) { return <Redirect href="/login" />; } return ( <View> <Text>Welcome Back!</Text> </View> ); }
HrefThe path of the route to navigate to. It can either be:
- string: A full path like
/profile/settingsor a relative path like../settings. - object: An object with a
pathnameand optionalparams. Thepathnamecan be a full path like/profile/settingsor a relative path like../settings. The params can be an object of key-value pairs.
Example
import { Redirect } from 'expo-router'; export default function RedirectToAbout() { return ( <Redirect href="/about" /> ); }
booleanRelative URL references are either relative to the directory or the document. By default, relative paths are relative to the document.
Type: React.Element<Omit<NavigatorProps<any>, 'children'>>
Renders the currently selected content.
There are actually two different implementations of <Slot/>:
- Used inside a
_layoutas theNavigator - Used inside a
Navigatoras the content
Since a custom Navigator will set the NavigatorContext.contextKey to
the current _layout, you can use this to determine if you are inside
a custom navigator or not.
Type: React.Element<VectorIconProps<NameT>>
Helper component for loading vector icons.
Prefer using the md and sf props on Icon rather than using this component directly.
Only use this component when you need to load a specific icon from a vector icon family.
Example
import { Icon, VectorIcon } from 'expo-router'; import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons'; <Icon src={<VectorIcon family={MaterialCommunityIcons} name="home" />} />
{
getImageSource: (name: NameT, size: number, color: ColorValue) => Promise<ImageSourcePropType | null>
}The family of the vector icon.
Example
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
Type: React.Element<LinkAppleZoomProps>
When this component is used inside a Link, zoom transition will be used when navigating to the link's href.
Type: React.Iterable<{
children: ReactNode
}>
Defines the target for an Apple zoom transition.
Example
import { Link } from 'expo-router'; export default function Screen() { return ( <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> <Link.AppleZoomTarget> <Image source={require('../assets/image.png')} style={{ width: 200, height: 200 }} /> </Link.AppleZoomTarget> </View> ); }
Type: React.Element<LinkMenuProps>
Groups context menu actions for a link.
If multiple Link.Menu components are used within a single Link, only the first will be rendered.
Only Link.MenuAction and Link.Menu components are allowed as children.
Example
<Link.Menu> <Link.MenuAction title="Action 1" onPress={() => {}} /> <Link.MenuAction title="Action 2" onPress={() => {}} /> </Link.Menu>
ReactNodebooleanIf true, the menu item will be displayed as destructive.
See: Apple documentation for more information.
stringThe preferred size of the menu elements.
elementSize property is ignored when palette is used.
See: Apple documentation for more information.
Acceptable values are: 'small' | 'medium' | 'auto' | 'large'
unionCustom image loaded using useImage() hook from expo-image.
Takes priority over icon (SF Symbol) when both are provided.
Example
import { useImage } from 'expo-image'; import { Link } from 'expo-router'; const customIcon = useImage('https://simpleicons.org/icons/expo.svg', { maxWidth: 24, maxHeight: 24, }); <Link.Menu image={customIcon} title="Menu"> <Link.MenuAction title="Action" onPress={() => {}} /> </Link.Menu>
Acceptable values are: ImageRef | null
booleanIf true, the menu will be displayed inline.
This means that the menu will not be collapsed
See: Apple documentation for more information.
booleanIf true, the menu will be displayed as a palette.
This means that the menu will be displayed as one row.
The elementSize property is ignored when palette is used, all items will be elementSize="small". Use elementSize="medium" instead of palette to display actions with titles horizontally.
Note: Palette menus are only supported in submenus.
See: Apple documentation for more information.
stringAn optional subtitle for the submenu. Does not appear on inline menus.
See: Apple documentation for more information.
Type: React.Element<LinkMenuActionProps>
This component renders a context menu action for a link.
It should only be used as a child of Link.Menu or LinkMenu.
booleanIf true, the menu item will be displayed as destructive.
See: Apple documentation for more information.
booleanIf true, the menu item will be disabled and not selectable.
See: Apple documentation for more information.
stringAn elaborated title that explains the purpose of the action.
boolean • Default: falseWhether the menu element should be hidden.
See: Apple documentation for more information.
unionCustom image loaded using useImage() hook from expo-image.
Takes priority over icon (SF Symbol) when both are provided.
Example
import { useImage } from 'expo-image'; import { Link } from 'expo-router'; const customIcon = useImage('https://simpleicons.org/icons/expo.svg', { maxWidth: 24, maxHeight: 24, }); <Link.Menu title="Menu"> <Link.MenuAction image={customIcon} title="Action" onPress={() => {}} /> </Link.Menu>
Acceptable values are: ImageRef | null
stringAn optional subtitle for the menu item.
See: Apple documentation for more information.
Deprecated: Use
childrenprop instead.
stringThe title of the menu item.
booleanIf true, the menu will be kept presented after the action is selected.
This is marked as unstable, because when action is selected it will recreate the menu, which will close all opened submenus and reset the scroll position.
See: Apple documentation for more information.
Type: React.Element<LinkPreviewProps>
A component used to render and customize the link preview.
If Link.Preview is used without any props, it will render a preview of the href passed to the Link.
If multiple Link.Preview components are used within a single Link, only the first one will be rendered.
To customize the preview, you can pass custom content as children.
Example
<Link href="/about"> <Link.Preview> <Text>Custom Preview Content</Text> </Link.Preview> </Link>
Example
<Link href="/about"> <Link.Preview /> </Link>
ReactNodeLinkPreviewStyleCustom styles for the preview container.
Note that some styles may not work, as they are limited or reset by the native view
Type: React.Iterable<LinkTriggerProps>
Serves as the trigger for a link. The content inside this component will be rendered as part of the base link.
If multiple Link.Trigger components are used within a single Link, only the first will be rendered.
Example
<Link href="/about"> <Link.Trigger> Trigger </Link.Trigger> </Link>
booleanA shorthand for enabling the Apple Zoom Transition on this link trigger.
When set to true, the trigger will be wrapped with Link.AppleZoom.
If another Link.AppleZoom is already used inside Link.Trigger, an error
will be thrown.
Type: React.Element<StackHeaderProps>
The component used to configure header styling for a stack screen.
Use this component to set header appearance properties like blur effect, background color, and shadow visibility.
Example
import { Stack } from 'expo-router'; export default function Page() { return ( <> <Stack.Header blurEffect="systemMaterial" style={{ backgroundColor: '#fff' }} /> <ScreenContent /> </> ); }
Example
When used inside a layout with Stack.Screen:
import { Stack } from 'expo-router'; export default function Layout() { return ( <Stack> <Stack.Screen name="index"> <Stack.Header blurEffect="systemMaterial" /> </Stack.Screen> </Stack> ); }
boolean • Default: falseWhen true, renders children as a custom header component, replacing the default header entirely.
Use this to implement fully custom header layouts.
BlurEffectTypesThe blur effect to apply to the header background on iOS. Common values include 'regular', 'prominent', 'systemMaterial', etc.
ReactNodeChild elements for custom header when asChild is true.
boolean • Default: falseWhether to hide the header completely. When set to true, the header will not be rendered.
StyleProp<{
backgroundColor: ColorValue,
shadowColor: 'transparent'
}>Style properties for the large title header (iOS).
backgroundColor: Background color of the large title headershadowColor: Set to 'transparent' to hide the large title shadow/border
StyleProp<{
backgroundColor: ColorValue,
color: ColorValue,
shadowColor: 'transparent'
}>Style properties for the standard-sized header.
color: Tint color for header elements (similar to tintColor in React Navigation)backgroundColor: Background color of the headershadowColor: Set to 'transparent' to hide the header shadow/border
Type: React.Element<StackScreenProps>
NativeStackNavigationOptionsType: React.Element<StackSearchBarProps>
A search bar component that integrates with the native stack header.
Note: Using
Stack.SearchBarwill automatically make the header visible (headerShown: true), as the search bar is rendered as part of the native header.
To display the search bar in the bottom toolbar on iOS 26+, use
Stack.Toolbar.SearchBarSlot inside Stack.Toolbar.
Example
import { Stack } from 'expo-router'; export default function Page() { return ( <> <Stack.SearchBar placeholder="Search..." onChangeText={(text) => console.log(text)} /> <ScreenContent /> </> ); }
Type: React.Element<StackToolbarProps>
The component used to configure the stack toolbar.
- Use
placement="left"to customize the left side of the header. - Use
placement="right"to customize the right side of the header. - Use
placement="bottom"(default) to show a bottom toolbar (iOS only).
Note: Using
Stack.Toolbarwithplacement="left"orplacement="right"will automatically make the header visible (headerShown: true), as the toolbar is rendered as part of the native header.
Note:
Stack.Toolbarwithplacement="bottom"can only be used inside page components, not in layout components.
Note: Stack.Toolbar is an experimental API and may change without notice.
Example
import { Stack } from 'expo-router'; export default function Layout() { return ( <Stack> <Stack.Screen name="index"> <Stack.Toolbar placement="left"> <Stack.Toolbar.Button icon="sidebar.left" onPress={() => alert('Left button pressed!')} /> </Stack.Toolbar> <Stack.Toolbar placement="right"> <Stack.Toolbar.Button icon="ellipsis.circle" onPress={() => alert('Right button pressed!')} /> </Stack.Toolbar> </Stack.Screen> </Stack> ); }
Example
import { Stack } from 'expo-router'; export default function Page() { return ( <> <Stack.Toolbar placement="left"> <Stack.Toolbar.Button icon="sidebar.left" onPress={() => alert('Left button pressed!')} /> </Stack.Toolbar> <Stack.Toolbar> <Stack.Toolbar.Spacer /> <Stack.Toolbar.Button icon="magnifyingglass" onPress={() => {}} /> <Stack.Toolbar.Spacer /> </Stack.Toolbar> <ScreenContent /> </> ); }
boolean • Default: falseWhen true, renders children as a custom component in the header area,
replacing the default header layout.
Only applies to placement="left" and placement="right".
ReactNodeChild elements to compose the toolbar. Can include Stack.Toolbar.Button, Stack.Toolbar.Menu, Stack.Toolbar.View, Stack.Toolbar.Spacer, and Stack.Toolbar.SearchBarSlot (bottom only) components.
ToolbarPlacement • Default: 'bottom'The placement of the toolbar.
'left': Renders items in the left area of the header.'right': Renders items in the right area of the header.'bottom': Renders items in the bottom toolbar (iOS only).
Type: React.Element<ScreenProps<TabsProps, TabNavigationState<ParamListBase>, BottomTabNavigationEventMap>>
Type: React.Element<StackScreenBackButtonProps>
Component to configure the back button.
Can be used inside Stack.Screen in a layout or directly inside a screen component.
Example
import { Stack } from 'expo-router'; export default function Layout() { return ( <Stack> <Stack.Screen name="detail"> <Stack.Screen.BackButton displayMode="minimal">Back</Stack.Screen.BackButton> </Stack.Screen> </Stack> ); }
Example
import { Stack } from 'expo-router'; export default function Page() { return ( <> <Stack.Screen.BackButton hidden /> <ScreenContent /> </> ); }
Type: React.Element<StackScreenTitleProps>
Component to set the screen title.
Can be used inside Stack.Screen in a layout or directly inside a screen component.
Example
import { Stack } from 'expo-router'; export default function Layout() { return ( <Stack> <Stack.Screen name="index"> <Stack.Screen.Title large>Home</Stack.Screen.Title> </Stack.Screen> </Stack> ); }
Example
import { Stack } from 'expo-router'; export default function Page() { return ( <> <Stack.Screen.Title>My Page</Stack.Screen.Title> <ScreenContent /> </> ); }
StyleProp<{
color: string,
fontFamily: TextStyle[fontFamily],
fontSize: TextStyle[fontSize],
fontWeight: Exclude<TextStyle[fontWeight], number>
}>StyleProp<{
color: string,
fontFamily: TextStyle[fontFamily],
fontSize: TextStyle[fontSize],
fontWeight: Exclude<TextStyle[fontWeight], number>,
textAlign: 'left' | 'center'
}>Type: React.Element<FC<StackToolbarBadgeProps>>
Type: React.Element<FC<StackToolbarButtonProps>>
ReactNodeThere are two ways to specify the content of the button:
Example
import { Stack } from 'expo-router'; export default function Page() { return ( <> <Stack.Toolbar placement="left"> <Stack.Toolbar.Button icon="star.fill">As text passed as children</Stack.Toolbar.Button> </Stack.Toolbar> <ScreenContent /> </> ); }
Example
import { Stack } from 'expo-router'; export default function Page() { return ( <> <Stack.Toolbar placement="left"> <Stack.Toolbar.Button> <Stack.Toolbar.Icon sf="star.fill" /> <Stack.Toolbar.Label>As components</Stack.Toolbar.Label> <Stack.Toolbar.Badge>3</Stack.Toolbar.Badge> </Stack.Toolbar.Button> </Stack.Toolbar> <ScreenContent /> </> ); }
Note: When icon is used, the label will not be shown and will be used for accessibility purposes only. Badge is only supported in left/right placements, not in bottom (iOS toolbar limitation).
boolean • Default: falseWhether the button should be hidden.
unionIcon to display in the button.
Can be a string representing an SFSymbol or an image source.
Note: When used in
placement="bottom", only string SFSymbols are supported. Use theimageprop to provide custom images.
Acceptable values are: ImageSourcePropType | SFSymbols7_0
ImageRefImage to display in the button.
Note: This prop is only supported in toolbar with
placement="bottom".
booleanWhether the button is in a selected state
See: Apple documentation for more information
boolean • Default: falseWhether to separate the background of this item from other header items.
StyleProp<TextStyle>Style for the label of the header item.
ColorValueThe tint color to apply to the button item
See: Apple documentation for more information.
Type: React.Element<FC<StackToolbarIconProps>>
ImageSourcePropTypeSFSymbolType: React.Element<FC<StackToolbarLabelProps>>
Type: React.Element<FC<StackToolbarMenuProps>>
ReactNodeMenu content - can include icons, labels, badges and menu actions.
Example
<Stack.Toolbar.Menu> <Stack.Toolbar.Icon sfSymbol="ellipsis.circle" /> <Stack.Toolbar.Label>Options</Stack.Toolbar.Label> <Stack.Toolbar.MenuAction onPress={() => {}}>Action 1</Stack.Toolbar.MenuAction> </Stack.Toolbar.Menu>
booleanIf true, the menu item will be displayed as destructive.
See: Apple documentation for more information.
stringThe preferred size of the menu elements.
Note: This prop is only supported in
Stack.Toolbar.Bottom.
See: Apple documentation for more information.
Acceptable values are: 'small' | 'medium' | 'auto' | 'large'
boolean • Default: falseWhether the menu should be hidden.
booleanWhether to hide the shared background.
See: Official Apple documentation for more information.
unionIcon for the menu item.
Can be an SF Symbol name or an image source.
Note: When used in
placement="bottom", only string SFSymbols are supported. Use theimageprop to provide custom images.
Acceptable values are: ImageSourcePropType | SFSymbols7_0
ImageRefImage to display for the menu item.
Note: This prop is only supported in toolbar with
placement="bottom".
booleanIf true, the menu will be displayed inline.
This means that the menu will not be collapsed
Note: Inline menus are only supported in submenus.
See: Apple documentation for more information.
booleanIf true, the menu will be displayed as a palette.
This means that the menu will be displayed as one row
Note: Palette menus are only supported in submenus.
See: Apple documentation for more information.
boolean • Default: falseWhether to separate the background of this item from other header items.
StyleProp<BasicTextStyle>Style for the label of the header item.
ColorValueThe tint color to apply to the button item
See: Apple documentation for more information.
Type: React.Element<FC<StackToolbarMenuActionProps>>
booleanIf true, the menu item will be displayed as destructive.
See: Apple documentation for more information.
booleanIf true, the menu item will be disabled and not selectable.
See: Apple documentation for more information.
stringAn elaborated title that explains the purpose of the action.
unionAcceptable values are: ImageSourcePropType | SFSymbols7_0
ImageRefImage to display for the menu action.
Note: This prop is only supported in
Stack.Toolbar.Bottom.
booleanIf true, the menu item will be displayed as selected.
stringAn optional subtitle for the menu item.
See: Apple documentation for more information.
booleanIf true, the menu will be kept presented after the action is selected.
This is marked as unstable, because when action is selected it will recreate the menu, which will close all opened submenus and reset the scroll position.
See: Apple documentation for more information.
Type: React.Element<FC<StackToolbarSearchBarSlotProps>>
boolean • Default: falseWhether the search bar slot should be hidden.
Type: React.Element<FC<StackToolbarSpacerProps>>
boolean • Default: falseWhether the spacer should be hidden.
booleanWhether this spacer shares background with adjacent items.
Only available in bottom placement.
Type: React.Element<FC<StackToolbarViewProps>>
boolean • Default: falseWhen true, renders children as a custom component in the header area,
replacing the default header layout.
Only applies to placement="left" and placement="right".
ReactNodeChild elements to compose the toolbar. Can include Stack.Toolbar.Button, Stack.Toolbar.Menu, Stack.Toolbar.View, Stack.Toolbar.Spacer, and Stack.Toolbar.SearchBarSlot (bottom only) components.
ToolbarPlacement • Default: 'bottom'The placement of the toolbar.
'left': Renders items in the left area of the header.'right': Renders items in the right area of the header.'bottom': Renders items in the bottom toolbar (iOS only).
ReactElement<unknown, string | JSXElementConstructor<any>>Can be any React node.
boolean • Default: falseWhether the view should be hidden.
booleanWhether to hide the shared background.
See: Official Apple documentation for more information.
Constants
Type: ColorType
Color utility to access platform-specific colors easily.
On Android, it provides access to:
- System colors, as a type-safe wrapper over
PlatformColor. For example,Color.android.background. - Attribute colors, as a type-safe wrapper over
PlatformColor. For example,Color.android.attr.colorPrimary. - Material Design 3 static colors. For example,
Color.android.material.primary. - Material Design 3 dynamic colors. For example,
Color.android.dynamic.primary.
On iOS, it is a type-safe wrapper over PlatformColor, providing access to system colors. For example, Color.ios.label.
Note: To ensure the colors align with the system theme on Android, make sure they are used within a component that responds to theme changes, such as by using the
useColorSchemehook from React Native.
Example
import { Color } from 'expo-router'; Color.ios.label; // Access iOS system color Color.android.background; // Access Android system color Color.android.attr.colorPrimary; // Access Android attribute color Color.android.material.primary; // Access Android Material Design 3 static color Color.android.dynamic.primary; // Access Android Material Design 3 dynamic color
Example
import { Color } from 'expo-router'; import { View, Text, useColorScheme } from 'react-native'; export default function MyComponent() { useColorScheme(); // Ensure the app responds to system theme changes return ( <View style={{ flex: 1, backgroundColor: Color.android.dynamic.primary }}> <Text style={{ color: Color.android.dynamic.onPrimary }}> Hello, World! </Text> </View> ); }
Type: {
addListener: (eventType: EventType, callback: (event: Payload<EventType>) => void) => () => void,
emit: (type: EventType, event: Payload<EventType>) => void,
enable: () => void,
isEnabled: () => boolean,
saveCurrentPathname: () => void,
}
Hooks
| Parameter | Type | Description |
|---|---|---|
| effect | EffectCallback | Memoized callback containing the effect, should optionally return a cleanup function. |
| do_not_pass_a_second_prop(optional) | undefined | - |
Hook to run an effect whenever a route is focused. Similar to
React.useEffect.
This can be used to perform side-effects such as fetching data or subscribing to events.
The passed callback should be wrapped in React.useCallback
to avoid running the effect too often.
voidExample
import { useFocusEffect } from 'expo-router'; import { useCallback } from 'react'; export default function Route() { useFocusEffect( // Callback should be wrapped in `React.useCallback` to avoid running the effect too often. useCallback(() => { // Invoked whenever the route is focused. console.log("Hello, I'm focused!"); // Return function is invoked whenever the route gets out of focus. return () => { console.log('This route is now unfocused.'); }; }, []), ); return </>; }
Returns URL parameters for globally selected route, including dynamic path segments. This function updates even when the route is not focused. Useful for analytics or other background operations that don't draw to the screen.
Route URL example: acme://profile/baconbrix?extra=info.
When querying search params in a stack, opt-towards using
useLocalSearchParams because it will only update when the route is focused.
Note: For usage information, see Local versus global search parameters.
RouteParams<TRoute> & TParamsExample
import { Text } from 'react-native'; import { useGlobalSearchParams } from 'expo-router'; export default function Route() { // user=baconbrix & extra=info const { user, extra } = useGlobalSearchParams(); return <Text>User: {user}</Text>; }
Hook to determine if the current route is rendered inside a preview.
boolean- True if the current route is rendered inside a preview, false otherwise.
Returns the result of the loader function for the calling route.
LoaderFunctionResult<T>Example
import { Text } from 'react-native'; import { useLoaderData } from 'expo-router'; export function loader() { return Promise.resolve({ foo: 'bar' }} } export default function Route() { // { foo: 'bar' } const data = useLoaderData<typeof loader>(); return <Text>Data: {JSON.stringify(data)}</Text>; }
Returns the URL parameters for the contextually focused route. Useful for stacks where you may push a new screen that changes the query parameters. For dynamic routes, both the route parameters and the search parameters are returned.
Route URL example: acme://profile/baconbrix?extra=info.
To observe updates even when the invoking route is not focused, use useGlobalSearchParams.
Note: For usage information, see Local versus global search parameters.
RouteParams<TRoute> & TParamsExample
import { Text } from 'react-native'; import { useLocalSearchParams } from 'expo-router'; export default function Route() { // user=baconbrix & extra=info const { user, extra } = useLocalSearchParams(); return <Text>User: {user}</Text>; }
| Parameter | Type | Description |
|---|---|---|
| parent(optional) | string | HrefObject | Provide an absolute path such as |
Returns the underlying React Navigation navigation object
to imperatively access layout-specific functionality like navigation.openDrawer() in a
Drawer layout.
TThe navigation object for the current route.
See: React Navigation documentation on navigation dependent functions for more information.
Example
import { useNavigation } from 'expo-router'; export default function Route() { // Access the current navigation object for the current route. const navigation = useNavigation(); return ( <View> <Text onPress={() => { // Open the drawer view. navigation.openDrawer(); }}> Open Drawer </Text> </View> ); }
When using nested layouts, you can access higher-order layouts by passing a secondary argument denoting the layout route.
For example, /menu/_layout.tsx is nested inside /app/orders/, you can use useNavigation('/orders/menu/').
Example
import { useNavigation } from 'expo-router'; export default function MenuRoute() { const rootLayout = useNavigation('/'); const ordersLayout = useNavigation('/orders'); // Same as the default results of `useNavigation()` when invoked in this route. const parentLayout = useNavigation('/orders/menu'); }
If you attempt to access a layout that doesn't exist, an error such as
Could not find parent navigation with route "/non-existent" is thrown.
NavigationContainerRefWithCurrent<RootParamList>The root <NavigationContainer /> ref for the app. The ref.current may be null
if the <NavigationContainer /> hasn't mounted yet.
Returns the currently selected route location without search parameters. For example, /acme?foo=bar returns /acme.
Segments will be normalized. For example, /[id]?id=normal becomes /normal.
stringExample
import { Text } from 'react-native'; import { usePathname } from 'expo-router'; export default function Route() { // pathname = "/profile/baconbrix" const pathname = usePathname(); return <Text>Pathname: {pathname}</Text>; }
| Parameter | Type |
|---|---|
| _options(optional) | UsePreventZoomTransitionDismissalOptions |
Limits the screen area where interactive dismissal gestures are allowed for zoom transitions.
This hook must be called from the destination screen of a zoom transition (the screen you navigate to, not the source). It restricts where app users can start swipe gestures to dismiss the screen and return to the previous screen.
When a dismissal gesture starts inside the bounds, the screen can be dismissed. When a dismissal gesture starts outside the bounds, dismissal is blocked completely. Undefined coordinates place no restriction on that dimension.
Note: Only one instance of this hook should be used per screen. If multiple instances exist, the last one to render will take effect.
voidExample
// In your destination screen (e.g., app/image.tsx) import { usePreventZoomTransitionDismissal } from 'expo-router'; import { useWindowDimensions } from 'react-native'; import { Image } from 'expo-image'; export default function ImageScreen() { const dimensions = useWindowDimensions(); // Only allow dismissal from the bottom 200px of the screen usePreventZoomTransitionDismissal({ unstable_dismissalBoundsRect: { minY: dimensions.height - 200 } }); return <Image source={...} style={{ flex: 1 }} />; }
Deprecated: Use
useNavigationContainerRefinstead, which returns a Reactref.
NavigationContainerRef<RootParamList> | nullReturns the navigation state of the navigator which contains the current screen.
Readonly<undefined>Example
import { useRootNavigationState } from 'expo-router'; export default function Route() { const { routes } = useRootNavigationState(); return <Text>{routes[0].name}</Text>; }
Returns a list of selected file segments for the currently selected route. Segments are not normalized,
so they will be the same as the file path. For example, /[id]?id=normal becomes ["[id]"].
RouteSegments<TSegments>Example
import { Text } from 'react-native'; import { useSegments } from 'expo-router'; export default function Route() { // segments = ["profile", "[user]"] const segments = useSegments(); return <Text>Hello</Text>; }
useSegments can be typed using an abstract. Consider the following file structure:
- app - [user] - index.tsx - followers.tsx - settings.tsx
This can be strictly typed using the following abstract with useSegments hook:
const [first, second] = useSegments<['settings'] | ['[user]'] | ['[user]', 'followers']>()
SitemapType | nullMethods
Element| Parameter | Type | Description |
|---|---|---|
| Nav | T | The navigator component to wrap. |
| processor(optional) | (options: ScreenProps[]) => ScreenProps[] | A function that processes the screens before passing them to the navigator. |
| useOnlyUserDefinedScreens(optional) | boolean | If true, all screens not specified as navigator's children will be ignored. Default: false |
Returns a navigator that automatically injects matched routes and renders nothing when there are no children.
Return type with children prop optional.
Enables use of other built-in React Navigation navigators and other navigators built with the React Navigation custom navigator API.
Component<PropsWithoutRef<PickPartial<ComponentProps<T>, 'children'>>> & {
Protected: FunctionComponent<ProtectedProps>,
Screen: (props: ScreenProps<TOptions, TState, TEventMap>) => null
}Example
import { ParamListBase, TabNavigationState } from "@react-navigation/native"; import { createMaterialTopTabNavigator, MaterialTopTabNavigationOptions, MaterialTopTabNavigationEventMap, } from "@react-navigation/material-top-tabs"; import { withLayoutContext } from "expo-router"; const MaterialTopTabs = createMaterialTopTabNavigator(); const ExpoRouterMaterialTopTabs = withLayoutContext< MaterialTopTabNavigationOptions, typeof MaterialTopTabs.Navigator, TabNavigationState<ParamListBase>, MaterialTopTabNavigationEventMap >(MaterialTopTabs.Navigator); export default function TabLayout() { return <ExpoRouterMaterialTopTabs />; }
Interfaces
| Property | Type | Description |
|---|---|---|
| background_dark | ColorValue | PlatformColor("@android:color/background_dark") |
| background_light | ColorValue | PlatformColor("@android:color/background_light") |
| black | ColorValue | PlatformColor("@android:color/black") |
| darker_gray | ColorValue | PlatformColor("@android:color/darker_gray") |
| tab_indicator_text | ColorValue | PlatformColor("@android:color/tab_indicator_text") |
| transparent | ColorValue | PlatformColor("@android:color/transparent") |
| white | ColorValue | PlatformColor("@android:color/white") |
| widget_edittext_dark | ColorValue | PlatformColor("@android:color/widget_edittext_dark") |
| Property | Type | Description |
|---|---|---|
| holo_blue_bright | ColorValue | PlatformColor("@android:color/holo_blue_bright") |
| holo_blue_dark | ColorValue | PlatformColor("@android:color/holo_blue_dark") |
| holo_blue_light | ColorValue | PlatformColor("@android:color/holo_blue_light") |
| holo_green_dark | ColorValue | PlatformColor("@android:color/holo_green_dark") |
| holo_green_light | ColorValue | PlatformColor("@android:color/holo_green_light") |
| holo_orange_dark | ColorValue | PlatformColor("@android:color/holo_orange_dark") |
| holo_orange_light | ColorValue | PlatformColor("@android:color/holo_orange_light") |
| holo_purple | ColorValue | PlatformColor("@android:color/holo_purple") |
| holo_red_dark | ColorValue | PlatformColor("@android:color/holo_red_dark") |
| holo_red_light | ColorValue | PlatformColor("@android:color/holo_red_light") |
| Property | Type | Description |
|---|---|---|
| system_accent1_0 | ColorValue | PlatformColor("@android:color/system_accent1_0") |
| system_accent1_10 | ColorValue | PlatformColor("@android:color/system_accent1_10") |
| system_accent1_100 | ColorValue | PlatformColor("@android:color/system_accent1_100") |
| system_accent1_1000 | ColorValue | PlatformColor("@android:color/system_accent1_1000") |
| system_accent1_200 | ColorValue | PlatformColor("@android:color/system_accent1_200") |
| system_accent1_300 | ColorValue | PlatformColor("@android:color/system_accent1_300") |
| system_accent1_400 | ColorValue | PlatformColor("@android:color/system_accent1_400") |
| system_accent1_50 | ColorValue | PlatformColor("@android:color/system_accent1_50") |
| system_accent1_500 | ColorValue | PlatformColor("@android:color/system_accent1_500") |
| system_accent1_600 | ColorValue | PlatformColor("@android:color/system_accent1_600") |
| system_accent1_700 | ColorValue | PlatformColor("@android:color/system_accent1_700") |
| system_accent1_800 | ColorValue | PlatformColor("@android:color/system_accent1_800") |
| system_accent1_900 | ColorValue | PlatformColor("@android:color/system_accent1_900") |
| system_accent2_0 | ColorValue | PlatformColor("@android:color/system_accent2_0") |
| system_accent2_10 | ColorValue | PlatformColor("@android:color/system_accent2_10") |
| system_accent2_100 | ColorValue | PlatformColor("@android:color/system_accent2_100") |
| system_accent2_1000 | ColorValue | PlatformColor("@android:color/system_accent2_1000") |
| system_accent2_200 | ColorValue | PlatformColor("@android:color/system_accent2_200") |
| system_accent2_300 | ColorValue | PlatformColor("@android:color/system_accent2_300") |
| system_accent2_400 | ColorValue | PlatformColor("@android:color/system_accent2_400") |
| system_accent2_50 | ColorValue | PlatformColor("@android:color/system_accent2_50") |
| system_accent2_500 | ColorValue | PlatformColor("@android:color/system_accent2_500") |
| system_accent2_600 | ColorValue | PlatformColor("@android:color/system_accent2_600") |
| system_accent2_700 | ColorValue | PlatformColor("@android:color/system_accent2_700") |
| system_accent2_800 | ColorValue | PlatformColor("@android:color/system_accent2_800") |
| system_accent2_900 | ColorValue | PlatformColor("@android:color/system_accent2_900") |
| system_accent3_0 | ColorValue | PlatformColor("@android:color/system_accent3_0") |
| system_accent3_10 | ColorValue | PlatformColor("@android:color/system_accent3_10") |
| system_accent3_100 | ColorValue | PlatformColor("@android:color/system_accent3_100") |
| system_accent3_1000 | ColorValue | PlatformColor("@android:color/system_accent3_1000") |
| system_accent3_200 | ColorValue | PlatformColor("@android:color/system_accent3_200") |
| system_accent3_300 | ColorValue | PlatformColor("@android:color/system_accent3_300") |
| system_accent3_400 | ColorValue | PlatformColor("@android:color/system_accent3_400") |
| system_accent3_50 | ColorValue | PlatformColor("@android:color/system_accent3_50") |
| system_accent3_500 | ColorValue | PlatformColor("@android:color/system_accent3_500") |
| system_accent3_600 | ColorValue | PlatformColor("@android:color/system_accent3_600") |
| system_accent3_700 | ColorValue | PlatformColor("@android:color/system_accent3_700") |
| system_accent3_800 | ColorValue | PlatformColor("@android:color/system_accent3_800") |
| system_accent3_900 | ColorValue | PlatformColor("@android:color/system_accent3_900") |
| system_neutral1_0 | ColorValue | PlatformColor("@android:color/system_neutral1_0") |
| system_neutral1_10 | ColorValue | PlatformColor("@android:color/system_neutral1_10") |
| system_neutral1_100 | ColorValue | PlatformColor("@android:color/system_neutral1_100") |
| system_neutral1_1000 | ColorValue | PlatformColor("@android:color/system_neutral1_1000") |
| system_neutral1_200 | ColorValue | PlatformColor("@android:color/system_neutral1_200") |
| system_neutral1_300 | ColorValue | PlatformColor("@android:color/system_neutral1_300") |
| system_neutral1_400 | ColorValue | PlatformColor("@android:color/system_neutral1_400") |
| system_neutral1_50 | ColorValue | PlatformColor("@android:color/system_neutral1_50") |
| system_neutral1_500 | ColorValue | PlatformColor("@android:color/system_neutral1_500") |
| system_neutral1_600 | ColorValue | PlatformColor("@android:color/system_neutral1_600") |
| system_neutral1_700 | ColorValue | PlatformColor("@android:color/system_neutral1_700") |
| system_neutral1_800 | ColorValue | PlatformColor("@android:color/system_neutral1_800") |
| system_neutral1_900 | ColorValue | PlatformColor("@android:color/system_neutral1_900") |
| system_neutral2_0 | ColorValue | PlatformColor("@android:color/system_neutral2_0") |
| system_neutral2_10 | ColorValue | PlatformColor("@android:color/system_neutral2_10") |
| system_neutral2_100 | ColorValue | PlatformColor("@android:color/system_neutral2_100") |
| system_neutral2_1000 | ColorValue | PlatformColor("@android:color/system_neutral2_1000") |
| system_neutral2_200 | ColorValue | PlatformColor("@android:color/system_neutral2_200") |
| system_neutral2_300 | ColorValue | PlatformColor("@android:color/system_neutral2_300") |
| system_neutral2_400 | ColorValue | PlatformColor("@android:color/system_neutral2_400") |
| system_neutral2_50 | ColorValue | PlatformColor("@android:color/system_neutral2_50") |
| system_neutral2_500 | ColorValue | PlatformColor("@android:color/system_neutral2_500") |
| system_neutral2_600 | ColorValue | PlatformColor("@android:color/system_neutral2_600") |
| system_neutral2_700 | ColorValue | PlatformColor("@android:color/system_neutral2_700") |
| system_neutral2_800 | ColorValue | PlatformColor("@android:color/system_neutral2_800") |
| system_neutral2_900 | ColorValue | PlatformColor("@android:color/system_neutral2_900") |
| Property | Type | Description |
|---|---|---|
| system_background_dark | ColorValue | PlatformColor("@android:color/system_background_dark") |
| system_background_light | ColorValue | PlatformColor("@android:color/system_background_light") |
| system_control_activated_dark | ColorValue | PlatformColor("@android:color/system_control_activated_dark") |
| system_control_activated_light | ColorValue | PlatformColor("@android:color/system_control_activated_light") |
| system_control_highlight_dark | ColorValue | PlatformColor("@android:color/system_control_highlight_dark") |
| system_control_highlight_light | ColorValue | PlatformColor("@android:color/system_control_highlight_light") |
| system_control_normal_dark | ColorValue | PlatformColor("@android:color/system_control_normal_dark") |
| system_control_normal_light | ColorValue | PlatformColor("@android:color/system_control_normal_light") |
| system_error_container_dark | ColorValue | PlatformColor("@android:color/system_error_container_dark") |
| system_error_container_light | ColorValue | PlatformColor("@android:color/system_error_container_light") |
| system_error_dark | ColorValue | PlatformColor("@android:color/system_error_dark") |
| system_error_light | ColorValue | PlatformColor("@android:color/system_error_light") |
| system_on_background_dark | ColorValue | PlatformColor("@android:color/system_on_background_dark") |
| system_on_background_light | ColorValue | PlatformColor("@android:color/system_on_background_light") |
| system_on_error_container_dark | ColorValue | PlatformColor("@android:color/system_on_error_container_dark") |
| system_on_error_container_light | ColorValue | PlatformColor("@android:color/system_on_error_container_light") |
| system_on_error_dark | ColorValue | PlatformColor("@android:color/system_on_error_dark") |
| system_on_error_light | ColorValue | PlatformColor("@android:color/system_on_error_light") |
| system_on_primary_container_dark | ColorValue | PlatformColor("@android:color/system_on_primary_container_dark") |
| system_on_primary_container_light | ColorValue | PlatformColor("@android:color/system_on_primary_container_light") |
| system_on_primary_dark | ColorValue | PlatformColor("@android:color/system_on_primary_dark") |
| system_on_primary_fixed | ColorValue | PlatformColor("@android:color/system_on_primary_fixed") |
| system_on_primary_fixed_variant | ColorValue | PlatformColor("@android:color/system_on_primary_fixed_variant") |
| system_on_primary_light | ColorValue | PlatformColor("@android:color/system_on_primary_light") |
| system_on_secondary_container_dark | ColorValue | PlatformColor("@android:color/system_on_secondary_container_dark") |
| system_on_secondary_container_light | ColorValue | PlatformColor("@android:color/system_on_secondary_container_light") |
| system_on_secondary_dark | ColorValue | PlatformColor("@android:color/system_on_secondary_dark") |
| system_on_secondary_fixed | ColorValue | PlatformColor("@android:color/system_on_secondary_fixed") |
| system_on_secondary_fixed_variant | ColorValue | PlatformColor("@android:color/system_on_secondary_fixed_variant") |
| system_on_secondary_light | ColorValue | PlatformColor("@android:color/system_on_secondary_light") |
| system_on_surface_dark | ColorValue | PlatformColor("@android:color/system_on_surface_dark") |
| system_on_surface_light | ColorValue | PlatformColor("@android:color/system_on_surface_light") |
| system_on_surface_variant_dark | ColorValue | PlatformColor("@android:color/system_on_surface_variant_dark") |
| system_on_surface_variant_light | ColorValue | PlatformColor("@android:color/system_on_surface_variant_light") |
| system_on_tertiary_container_dark | ColorValue | PlatformColor("@android:color/system_on_tertiary_container_dark") |
| system_on_tertiary_container_light | ColorValue | PlatformColor("@android:color/system_on_tertiary_container_light") |
| system_on_tertiary_dark | ColorValue | PlatformColor("@android:color/system_on_tertiary_dark") |
| system_on_tertiary_fixed | ColorValue | PlatformColor("@android:color/system_on_tertiary_fixed") |
| system_on_tertiary_fixed_variant | ColorValue | PlatformColor("@android:color/system_on_tertiary_fixed_variant") |
| system_on_tertiary_light | ColorValue | PlatformColor("@android:color/system_on_tertiary_light") |
| system_outline_dark | ColorValue | PlatformColor("@android:color/system_outline_dark") |
| system_outline_light | ColorValue | PlatformColor("@android:color/system_outline_light") |
| system_outline_variant_dark | ColorValue | PlatformColor("@android:color/system_outline_variant_dark") |
| system_outline_variant_light | ColorValue | PlatformColor("@android:color/system_outline_variant_light") |
| system_palette_key_color_neutral_dark | ColorValue | PlatformColor("@android:color/system_palette_key_color_neutral_dark") |
| system_palette_key_color_neutral_light | ColorValue | PlatformColor("@android:color/system_palette_key_color_neutral_light") |
| system_palette_key_color_neutral_variant_dark | ColorValue | PlatformColor("@android:color/system_palette_key_color_neutral_variant_dark") |
| system_palette_key_color_neutral_variant_light | ColorValue | PlatformColor("@android:color/system_palette_key_color_neutral_variant_light") |
| system_palette_key_color_primary_dark | ColorValue | PlatformColor("@android:color/system_palette_key_color_primary_dark") |
| system_palette_key_color_primary_light | ColorValue | PlatformColor("@android:color/system_palette_key_color_primary_light") |
| system_palette_key_color_secondary_dark | ColorValue | PlatformColor("@android:color/system_palette_key_color_secondary_dark") |
| system_palette_key_color_secondary_light | ColorValue | PlatformColor("@android:color/system_palette_key_color_secondary_light") |
| system_palette_key_color_tertiary_dark | ColorValue | PlatformColor("@android:color/system_palette_key_color_tertiary_dark") |
| system_palette_key_color_tertiary_light | ColorValue | PlatformColor("@android:color/system_palette_key_color_tertiary_light") |
| system_primary_container_dark | ColorValue | PlatformColor("@android:color/system_primary_container_dark") |
| system_primary_container_light | ColorValue | PlatformColor("@android:color/system_primary_container_light") |
| system_primary_dark | ColorValue | PlatformColor("@android:color/system_primary_dark") |
| system_primary_fixed | ColorValue | PlatformColor("@android:color/system_primary_fixed") |
| system_primary_fixed_dim | ColorValue | PlatformColor("@android:color/system_primary_fixed_dim") |
| system_primary_light | ColorValue | PlatformColor("@android:color/system_primary_light") |
| system_secondary_container_dark | ColorValue | PlatformColor("@android:color/system_secondary_container_dark") |
| system_secondary_container_light | ColorValue | PlatformColor("@android:color/system_secondary_container_light") |
| system_secondary_dark | ColorValue | PlatformColor("@android:color/system_secondary_dark") |
| system_secondary_fixed | ColorValue | PlatformColor("@android:color/system_secondary_fixed") |
| system_secondary_fixed_dim | ColorValue | PlatformColor("@android:color/system_secondary_fixed_dim") |
| system_secondary_light | ColorValue | PlatformColor("@android:color/system_secondary_light") |
| system_surface_bright_dark | ColorValue | PlatformColor("@android:color/system_surface_bright_dark") |
| system_surface_bright_light | ColorValue | PlatformColor("@android:color/system_surface_bright_light") |
| system_surface_container_dark | ColorValue | PlatformColor("@android:color/system_surface_container_dark") |
| system_surface_container_high_dark | ColorValue | PlatformColor("@android:color/system_surface_container_high_dark") |
| system_surface_container_high_light | ColorValue | PlatformColor("@android:color/system_surface_container_high_light") |
| system_surface_container_highest_dark | ColorValue | PlatformColor("@android:color/system_surface_container_highest_dark") |
| system_surface_container_highest_light | ColorValue | PlatformColor("@android:color/system_surface_container_highest_light") |
| system_surface_container_light | ColorValue | PlatformColor("@android:color/system_surface_container_light") |
| system_surface_container_low_dark | ColorValue | PlatformColor("@android:color/system_surface_container_low_dark") |
| system_surface_container_low_light | ColorValue | PlatformColor("@android:color/system_surface_container_low_light") |
| system_surface_container_lowest_dark | ColorValue | PlatformColor("@android:color/system_surface_container_lowest_dark") |
| system_surface_container_lowest_light | ColorValue | PlatformColor("@android:color/system_surface_container_lowest_light") |
| system_surface_dark | ColorValue | PlatformColor("@android:color/system_surface_dark") |
| system_surface_dim_dark | ColorValue | PlatformColor("@android:color/system_surface_dim_dark") |
| system_surface_dim_light | ColorValue | PlatformColor("@android:color/system_surface_dim_light") |
| system_surface_light | ColorValue | PlatformColor("@android:color/system_surface_light") |
| system_surface_variant_dark | ColorValue | PlatformColor("@android:color/system_surface_variant_dark") |
| system_surface_variant_light | ColorValue | PlatformColor("@android:color/system_surface_variant_light") |
| system_tertiary_container_dark | ColorValue | PlatformColor("@android:color/system_tertiary_container_dark") |
| system_tertiary_container_light | ColorValue | PlatformColor("@android:color/system_tertiary_container_light") |
| system_tertiary_dark | ColorValue | PlatformColor("@android:color/system_tertiary_dark") |
| system_tertiary_fixed | ColorValue | PlatformColor("@android:color/system_tertiary_fixed") |
| system_tertiary_fixed_dim | ColorValue | PlatformColor("@android:color/system_tertiary_fixed_dim") |
| system_tertiary_light | ColorValue | PlatformColor("@android:color/system_tertiary_light") |
| system_text_hint_inverse_dark | ColorValue | PlatformColor("@android:color/system_text_hint_inverse_dark") |
| system_text_hint_inverse_light | ColorValue | PlatformColor("@android:color/system_text_hint_inverse_light") |
| system_text_primary_inverse_dark | ColorValue | PlatformColor("@android:color/system_text_primary_inverse_dark") |
| system_text_primary_inverse_disable_only_dark | ColorValue | PlatformColor("@android:color/system_text_primary_inverse_disable_only_dark") |
| system_text_primary_inverse_disable_only_light | ColorValue | PlatformColor("@android:color/system_text_primary_inverse_disable_only_light") |
| system_text_primary_inverse_light | ColorValue | PlatformColor("@android:color/system_text_primary_inverse_light") |
| system_text_secondary_and_tertiary_inverse_dark | ColorValue | PlatformColor("@android:color/system_text_secondary_and_tertiary_inverse_dark") |
| system_text_secondary_and_tertiary_inverse_disabled_dark | ColorValue | PlatformColor("@android:color/system_text_secondary_and_tertiary_inverse_disabled_dark") |
| system_text_secondary_and_tertiary_inverse_disabled_light | ColorValue | PlatformColor("@android:color/system_text_secondary_and_tertiary_inverse_disabled_light") |
| system_text_secondary_and_tertiary_inverse_light | ColorValue | PlatformColor("@android:color/system_text_secondary_and_tertiary_inverse_light") |
| Property | Type | Description |
|---|---|---|
| system_error_0 | ColorValue | PlatformColor("@android:color/system_error_0") |
| system_error_10 | ColorValue | PlatformColor("@android:color/system_error_10") |
| system_error_100 | ColorValue | PlatformColor("@android:color/system_error_100") |
| system_error_1000 | ColorValue | PlatformColor("@android:color/system_error_1000") |
| system_error_200 | ColorValue | PlatformColor("@android:color/system_error_200") |
| system_error_300 | ColorValue | PlatformColor("@android:color/system_error_300") |
| system_error_400 | ColorValue | PlatformColor("@android:color/system_error_400") |
| system_error_50 | ColorValue | PlatformColor("@android:color/system_error_50") |
| system_error_500 | ColorValue | PlatformColor("@android:color/system_error_500") |
| system_error_600 | ColorValue | PlatformColor("@android:color/system_error_600") |
| system_error_700 | ColorValue | PlatformColor("@android:color/system_error_700") |
| system_error_800 | ColorValue | PlatformColor("@android:color/system_error_800") |
| system_error_900 | ColorValue | PlatformColor("@android:color/system_error_900") |
| system_on_surface_disabled | ColorValue | PlatformColor("@android:color/system_on_surface_disabled") |
| system_outline_disabled | ColorValue | PlatformColor("@android:color/system_outline_disabled") |
| system_surface_disabled | ColorValue | PlatformColor("@android:color/system_surface_disabled") |
| Property | Type | Description |
|---|---|---|
| colorBackground | ColorValue | PlatformColor("?attr/colorBackground") |
| colorForeground | ColorValue | PlatformColor("?attr/colorForeground") |
| colorForegroundInverse | ColorValue | PlatformColor("?attr/colorForegroundInverse") |
| Property | Type | Description |
|---|---|---|
| colorActivatedHighlight | ColorValue | PlatformColor("?attr/colorActivatedHighlight") |
| colorFocusedHighlight | ColorValue | PlatformColor("?attr/colorFocusedHighlight") |
| colorLongPressedHighlight | ColorValue | PlatformColor("?attr/colorLongPressedHighlight") |
| colorMultiSelectHighlight | ColorValue | PlatformColor("?attr/colorMultiSelectHighlight") |
| colorPressedHighlight | ColorValue | PlatformColor("?attr/colorPressedHighlight") |
| Property | Type | Description |
|---|---|---|
| colorAccent | ColorValue | PlatformColor("?attr/colorAccent") |
| colorButtonNormal | ColorValue | PlatformColor("?attr/colorButtonNormal") |
| colorControlActivated | ColorValue | PlatformColor("?attr/colorControlActivated") |
| colorControlHighlight | ColorValue | PlatformColor("?attr/colorControlHighlight") |
| colorControlNormal | ColorValue | PlatformColor("?attr/colorControlNormal") |
| colorEdgeEffect | ColorValue | PlatformColor("?attr/colorEdgeEffect") |
| colorPrimary | ColorValue | PlatformColor("?attr/colorPrimary") |
| colorPrimaryDark | ColorValue | PlatformColor("?attr/colorPrimaryDark") |
| Property | Type | Description |
|---|---|---|
| colorBackgroundFloating | ColorValue | PlatformColor("?attr/colorBackgroundFloating") |
| Property | Type | Description |
|---|---|---|
| colorSecondary | ColorValue | PlatformColor("?attr/colorSecondary") |
| Property | Type | Description |
|---|---|---|
| colorError | ColorValue | PlatformColor("?attr/colorError") |
| colorMode | ColorValue | PlatformColor("?attr/colorMode") |
| Property | Type | Description |
|---|---|---|
| colorBackgroundCacheHint | ColorValue | PlatformColor("?attr/colorBackgroundCacheHint") |
| Property | Type | Description |
|---|---|---|
| primary_text_dark | ColorValue |
PlatformColor("@android:color/primary_text_dark") |
| primary_text_dark_nodisable | ColorValue |
PlatformColor("@android:color/primary_text_dark_nodisable") |
| primary_text_light | ColorValue |
PlatformColor("@android:color/primary_text_light") |
| primary_text_light_nodisable | ColorValue |
PlatformColor("@android:color/primary_text_light_nodisable") |
| secondary_text_dark | ColorValue |
PlatformColor("@android:color/secondary_text_dark") |
| secondary_text_dark_nodisable | ColorValue |
PlatformColor("@android:color/secondary_text_dark_nodisable") |
| secondary_text_light | ColorValue |
PlatformColor("@android:color/secondary_text_light") |
| secondary_text_light_nodisable | ColorValue |
PlatformColor("@android:color/secondary_text_light_nodisable") |
| tertiary_text_dark | ColorValue |
PlatformColor("@android:color/tertiary_text_dark") |
| tertiary_text_light | ColorValue |
PlatformColor("@android:color/tertiary_text_light") |
Android Dynamic Material Colors
You can find out more about color roles in official Material Design 3 documentation.
You can read about the difference between dynamic and static colors in official Material Design 3 documentation.
For a detailed definition of each color role, see material components color documentation.
| Property | Type | Description |
|---|---|---|
| background | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| error | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| errorContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onBackground | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onError | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onErrorContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onPrimary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onPrimaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onPrimaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onPrimaryFixedVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSecondary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSecondaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSecondaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSecondaryFixedVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSurface | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSurfaceInverse | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onSurfaceVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onTertiary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onTertiaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onTertiaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| onTertiaryFixedVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| outline | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| outlineVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| primary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| primaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| primaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| primaryFixedDim | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| primaryInverse | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| secondary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| secondaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| secondaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| secondaryFixedDim | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surface | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceBright | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceContainerHigh | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceContainerHighest | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceContainerLow | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceContainerLowest | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceDim | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceInverse | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| surfaceVariant | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| tertiary | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| tertiaryContainer | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| tertiaryFixed | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
| tertiaryFixedDim | ColorValue | Android Dynamic Material Colors This color adapts based on the user's wallpaper and theme settings. |
Android Static Material Colors
You can find out more about color roles in official Material Design 3 documentation.
You can read about the difference between dynamic and static colors in official Material Design 3 documentation.
For a detailed definition of each color role, see material components color documentation.
| Property | Type | Description |
|---|---|---|
| background | ColorValue | |
| error | ColorValue | |
| errorContainer | ColorValue | |
| onBackground | ColorValue | |
| onError | ColorValue | |
| onErrorContainer | ColorValue | |
| onPrimary | ColorValue | |
| onPrimaryContainer | ColorValue | |
| onPrimaryFixed | ColorValue | |
| onPrimaryFixedVariant | ColorValue | |
| onSecondary | ColorValue | |
| onSecondaryContainer | ColorValue | |
| onSecondaryFixed | ColorValue | |
| onSecondaryFixedVariant | ColorValue | |
| onSurface | ColorValue | |
| onSurfaceInverse | ColorValue | |
| onSurfaceVariant | ColorValue | |
| onTertiary | ColorValue | |
| onTertiaryContainer | ColorValue | |
| onTertiaryFixed | ColorValue | |
| onTertiaryFixedVariant | ColorValue | |
| outline | ColorValue | |
| outlineVariant | ColorValue | |
| primary | ColorValue | |
| primaryContainer | ColorValue | |
| primaryFixed | ColorValue | |
| primaryFixedDim | ColorValue | |
| primaryInverse | ColorValue | |
| secondary | ColorValue | |
| secondaryContainer | ColorValue | |
| secondaryFixed | ColorValue | |
| secondaryFixedDim | ColorValue | |
| surface | ColorValue | |
| surfaceBright | ColorValue | |
| surfaceContainer | ColorValue | |
| surfaceContainerHigh | ColorValue | |
| surfaceContainerHighest | ColorValue | |
| surfaceContainerLow | ColorValue | |
| surfaceContainerLowest | ColorValue | |
| surfaceDim | ColorValue | |
| surfaceInverse | ColorValue | |
| surfaceVariant | ColorValue | |
| tertiary | ColorValue | |
| tertiaryContainer | ColorValue | |
| tertiaryFixed | ColorValue | |
| tertiaryFixedDim | ColorValue |
| Property | Type | Description |
|---|---|---|
| android | AndroidBaseColorSDK1 & AndroidBaseColorSDK14 & AndroidBaseColorSDK31 & AndroidBaseColorSDK34 & AndroidBaseColorSDK35 & AndroidDeprecatedColor & undefined & {
attr: AndroidBaseColorAttr,
dynamic: AndroidDynamicMaterialColor,
material: AndroidMaterialColor
} | - |
| ios | IOSBaseColor & undefined | - |
Defines the screen bounds where interactive dismissal gestures are allowed for zoom transitions.
| Property | Type | Description |
|---|---|---|
| maxX(optional) | number | Maximum X coordinate (right edge) where dismissal gestures are allowed. |
| maxY(optional) | number | Maximum Y coordinate (bottom edge) where dismissal gestures are allowed. |
| minX(optional) | number | Minimum X coordinate (left edge) where dismissal gestures are allowed. |
| minY(optional) | number | Minimum Y coordinate (top edge) where dismissal gestures are allowed. |
| Property | Type | Description |
|---|---|---|
| darkText | ColorValue | PlatformColor("darkText") |
| label | ColorValue | PlatformColor("label") |
| lightText | ColorValue | PlatformColor("lightText") |
| link | ColorValue | PlatformColor("link") |
| opaqueSeparator | ColorValue | PlatformColor("opaqueSeparator") |
| placeholderText | ColorValue | PlatformColor("placeholderText") |
| quaternaryLabel | ColorValue | PlatformColor("quaternaryLabel") |
| quaternarySystemFill | ColorValue | PlatformColor("quaternarySystemFill") |
| secondaryLabel | ColorValue | PlatformColor("secondaryLabel") |
| secondarySystemBackground | ColorValue | PlatformColor("secondarySystemBackground") |
| secondarySystemFill | ColorValue | PlatformColor("secondarySystemFill") |
| secondarySystemGroupedBackground | ColorValue | PlatformColor("secondarySystemGroupedBackground") |
| separator | ColorValue | PlatformColor("separator") |
| systemBackground | ColorValue | PlatformColor("systemBackground") |
| systemBlue | ColorValue | PlatformColor("systemBlue") |
| systemBrown | ColorValue | PlatformColor("systemBrown") |
| systemCyan | ColorValue | PlatformColor("systemCyan") |
| systemFill | ColorValue | PlatformColor("systemFill") |
| systemGray | ColorValue | PlatformColor("systemGray") |
| systemGray2 | ColorValue | PlatformColor("systemGray2") |
| systemGray3 | ColorValue | PlatformColor("systemGray3") |
| systemGray4 | ColorValue | PlatformColor("systemGray4") |
| systemGray5 | ColorValue | PlatformColor("systemGray5") |
| systemGray6 | ColorValue | PlatformColor("systemGray6") |
| systemGreen | ColorValue | PlatformColor("systemGreen") |
| systemGroupedBackground | ColorValue | PlatformColor("systemGroupedBackground") |
| systemIndigo | ColorValue | PlatformColor("systemIndigo") |
| systemMint | ColorValue | PlatformColor("systemMint") |
| systemOrange | ColorValue | PlatformColor("systemOrange") |
| systemPink | ColorValue | PlatformColor("systemPink") |
| systemPurple | ColorValue | PlatformColor("systemPurple") |
| systemRed | ColorValue | PlatformColor("systemRed") |
| systemTeal | ColorValue | PlatformColor("systemTeal") |
| systemYellow | ColorValue | PlatformColor("systemYellow") |
| tertiaryLabel | ColorValue | PlatformColor("tertiaryLabel") |
| tertiarySystemBackground | ColorValue | PlatformColor("tertiarySystemBackground") |
| tertiarySystemFill | ColorValue | PlatformColor("tertiarySystemFill") |
| tertiarySystemGroupedBackground | ColorValue | PlatformColor("tertiarySystemGroupedBackground") |
| Property | Type | Description |
|---|---|---|
| accessibilityHint(optional) | string | - |
| accessibilityLabel(optional) | string | - |
| children(optional) | ReactNode | - |
| disabled(optional) | boolean | - |
| hidesSharedBackground(optional) | boolean | - |
| icon(optional) | ImageSourcePropType | SFSymbols7_0 | - |
| separateBackground(optional) | boolean | - |
| style(optional) | StyleProp<BasicTextStyle> | - |
| tintColor(optional) | ColorValue | - |
| variant(optional) | 'done' | 'prominent' | 'plain' | Default: 'plain' |
| Property | Type | Description |
|---|---|---|
| unstable_dismissalBoundsRect(optional) | DismissalBoundsRect | Defines the screen bounds where interactive dismissal gestures are allowed. Each coordinate is optional. Undefined coordinates place no restriction on that dimension.
For example, if only
|
Types
Type: AndroidBaseColorSDK1 AndroidBaseColorSDK14 AndroidBaseColorSDK31 AndroidBaseColorSDK34 AndroidBaseColorSDK35 AndroidDeprecatedColor extended by:
| Property | Type | Description |
|---|
Type: AndroidColorAttrSDK1 AndroidColorAttrSDK5 AndroidColorAttrSDK14 AndroidColorAttrSDK21 AndroidColorAttrSDK23 AndroidColorAttrSDK25 AndroidColorAttrSDK26 extended by:
| Property | Type | Description |
|---|
Type: AndroidDynamicMaterialColorType extended by:
| Property | Type | Description |
|---|
Type: AndroidStaticMaterialColorType extended by:
| Property | Type | Description |
|---|
Memoized callback containing the effect, should optionally return a cleanup function.
undefined | void | () => void
Literal Type: union
Acceptable values are: {string}:{string} | //{string}
The main routing type for Expo Router. It includes all available routes with strongly typed parameters. It can either be:
- string: A full path like
/profile/settingsor a relative path like../settings. - object: An object with a
pathnameand optionalparams. Thepathnamecan be a full path like/profile/settingsor a relative path like../settings. The params can be an object of key-value pairs.
An Href can either be a string or an object.
Generic: T
Type: T ? T[href] : string | HrefObject
| Property | Type | Description |
|---|---|---|
| params(optional) | UnknownInputParams | Optional parameters for the route. |
| pathname | string | The path of the route. |
Created by using a special file called +native-intent.tsx at the top-level of your
project's app directory. It exports redirectSystemPath or legacy_subscribe functions,
both methods designed to handle URL/path processing.
Useful for re-writing URLs to correctly target a route when unique/referred URLs are incoming from third-party providers or stale URLs from previous versions.
See: For more information on how to use
NativeIntent, see Customizing links.
| Property | Type | Description |
|---|---|---|
| legacy_subscribe(optional) | (listener: (url: string) => void) => undefined | void | () => void |
Useful as an alternative API when a third-party provider doesn't support Expo Router
but has support for React Navigation via Using this API is not recommended for newer projects or integrations since it is incompatible with Server Side Routing and Static Rendering, and can become challenging to manage while offline or in a low network environment. |
| redirectSystemPath(optional) | (event: {
initial: boolean,
path: string
}) => Promise<string | null> | string | null | A special method used to process URLs in native apps. When invoked, it receives an
Its return value should be a Note that throwing errors within this method may result in app crashes. It's recommended to
wrap your code inside a
|
Literal Type: union
The list of input keys will become optional, everything else will remain the same.
| Property | Type | Description |
|---|---|---|
| destination | string | - |
| destinationContextKey | string | - |
| external(optional) | boolean | - |
| methods(optional) | string[] | - |
| permanent(optional) | boolean | - |
| source | string | - |
Literal Type: union
Acceptable values are: ./{string} | ../{string} | '..'
Type: PartialState<NavigationState> extended by:
| Property | Type | Description |
|---|---|---|
| state(optional) | ResultState | - |
Type: Exclude<Extract[pathname], RelativePathString | ExternalPathString>
Returns router object for imperative navigation API.
Example
import { router } from 'expo-router'; import { Text } from 'react-native'; export default function Route() { return ( <Text onPress={() => router.push('/home')}>Go Home</Text> ); }
| Property | Type | Description |
|---|---|---|
| back | () => void | Goes back in the navigation history. |
| canDismiss | () => boolean | Checks if it is possible to dismiss the current screen. Returns |
| canGoBack | () => boolean | Navigates to a route in the navigator's history if it supports invoking the |
| dismiss | (count: number) => void | Navigates to the a stack lower than the current screen using the provided count if possible, otherwise 1. If the current screen is the only route, it will dismiss the entire stack. |
| dismissAll | () => void | Returns to the first screen in the closest stack. This is similar to
|
| dismissTo | (href: Href, options: NavigationOptions) => void | Dismisses screens until the provided href is reached. If the href is not found, it will instead replace the current screen with the provided |
| navigate | (href: Href, options: NavigationOptions) => void | Navigates to the provided |
| prefetch | (name: Href) => void | Prefetch a screen in the background before navigating to it |
| push | (href: Href, options: NavigationOptions) => void | Navigates to the provided |
| replace | (href: Href, options: NavigationOptions) => void | Navigates to route without appending to the history. Can be used with
|
| setParams | (params: Partial<RouteInputParams<T>>) => void | Updates the current route's query params. |
| Property | Type | Description |
|---|---|---|
| dangerouslySingular(optional) | SingularOptions | - |
| getId(optional) | ({ params }: {
params: Record<string, any>
}) => string | undefined | - |
| initialParams(optional) | Record<string, any> | - |
| listeners(optional) | ScreenListeners<TState, TEventMap> | (prop: {
navigation: any,
route: RouteProp<ParamListBase, string>
}) => ScreenListeners<TState, TEventMap> | - |
| name(optional) | string | Name is required when used inside a Layout component. |
| options(optional) | TOptions | (prop: {
navigation: any,
route: RouteProp<ParamListBase, string>
}) => TOptions | - |
| redirect(optional) | boolean | Redirect to the nearest sibling route.
If all children are |
Type: boolean or object shaped as below:
(name, params) => string | undefined
string | undefined| Parameter | Type | Description |
|---|---|---|
| name(index signature) | string | - |
| params(index signature) | UnknownOutputParams | - |
| Property | Type | Description |
|---|---|---|
| children | SitemapType[] | - |
| contextKey | string | - |
| filename | string | - |
| href | string | Href | - |
| isGenerated | boolean | - |
| isInitial | boolean | - |
| isInternal | boolean | - |
| Property | Type | Description |
|---|---|---|
| download(optional) | string | Specifies that the The value of the Example
|
| rel(optional) | string | Specifies the relationship between the Common values:
The This property is passed to the underlying anchor ( Example
|
| target(optional) | '_self' | '_blank' | '_parent' | '_top' | string & object | Specifies where to open the
This property is passed to the underlying anchor ( Default: '_self'Example
|