# Split.Screen

URL: https://nitro-ui.com/docs/navigation/components/split-screen

Register a route in a split navigator and open it beside the sidebar.

Inside a `Split.Navigator`, give each `Split.Screen` a route `name` and a React `component`. The first screen is the sidebar. Type the route parameters when creating the navigator. The `options` callback can then read those parameters to set the navigation bar title.

For a `Note` route declared as `{ title: string }`, open a note from the sidebar and use its title in the bar.

```tsx
<Split.Screen
  name="Note"
  component={Note}
  options={({ route }) => ({ title: route.params.title })}
/>
```

```tsx
const navigation = useNavigation<SplitNavigationProp<Routes>>()
navigation.showDetail('Note', { title: 'River walk' })
```

`showDetail` shows the screen beside the sidebar and closes the screens opened from the sidebar before. A screen with `getId` that is already open for the same id stays open, as with `push`. `push` keeps the other screens and adds the screen on top. On one stack, both push the screen above the sidebar. [Split.Navigator](/docs/navigation/components/split-navigator)

## Props

Supply `name` and exactly one of `component`, `getComponent`, or `children`.

| Prop            | Type                                  | Use                                                                         |
| --------------- | ------------------------------------- | --------------------------------------------------------------------------- |
| `name`          | Route name                            | Required. A unique route name from this navigator’s parameter list.         |
| `component`     | React component                       | Render this component with the route and navigation props.                  |
| `getComponent`  | `() => Component`                     | Resolve the screen component on demand.                                     |
| `children`      | Render callback                       | Return screen content from the route and navigation props.                  |
| `options`       | `SplitNavigationOptions` or callback  | Configure this screen. A callback receives the route, navigation and theme. |
| `initialParams` | Partial route params                  | Set initial values for the route parameters.                                |
| `getId`         | `({ params }) => string \| undefined` | Derive an identity for this screen from its route parameters.               |
| `navigationKey` | `string`                              | Change this key to remove or reset existing routes with this name.          |
| `listeners`     | Listeners or callback                 | Subscribe to events for this screen.                                        |
| `layout`        | Render callback                       | Wrap this screen’s rendered content.                                        |

### Screen options

These fields go inside `options` or `screenOptions`.

| Option               | Type         | Use                                                                                                                                                                      |
| -------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `title`              | `string`     | Native navigation bar title. Defaults to the route name.                                                                                                                 |
| `headerShown`        | `boolean`    | Show the native navigation bar. Defaults to `true`.                                                                                                                      |
| `headerTintColor`    | `ColorValue` | Color the navigation bar title and back button. Defaults to the system color.                                                                                            |
| `onAndroidBackPress` | `() => void` | Handle Android system Back while this screen is focused. The sidebar is focused while no screen is open from it.                                                         |
| `inspector`          | `ReactNode`  | This screen's inspector, a panel about it that shows in a trailing column or a sheet. [Show an inspector](/docs/navigation/components/split-navigator#show-an-inspector) |
| `inspectorTitle`     | `string`     | Title of the inspector's navigation bar, which takes this screen's `headerTintColor`. Defaults to none.                                                                  |
