> For the complete documentation index, see [llms.txt](https://bluebase.gitbook.io/core/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bluebase.gitbook.io/core/tutorial/2.-create-screens/3.4-tab-navigation.md).

# 3.4 Tab Navigation

To improve the user experience of our app, we want to add tabs on the main page. One tab will show all pending tasks, while the other one will show the completed tasks.

### Step 1: Add Tab Navigator

It is possible to add nested routes in BlueBase. Whenever we want to do this, we will add a `navigator` property in the route. There are several navigators available to use (i.e. `switch`, `stack`, `tab`, `bottom-tabs`, `drawer`).

Inside the navigator, we add our desired routes:

{% code title="" %}

```jsx
{
	name: 'TasksApp',
	screen: Noop,
	path: '',
	exact: false,
	
	options: {
		title: 'My Tasks',
		headerRight: () => <TaskCreateButton />
	},
	
	navigator: {
		headerMode: 'none',
		type: 'tab',
	
		routes: [{
			exact: true,
			name: 'PendingTask',
			path: 'pending',
			screen: 'PendingTasksScreen',

			options: {
				title: 'Pending',
			},
		}, {
			exact: true,
			name: 'CompletedTasks',
			path: 'completed',
			screen: 'CompletedTasksScreen',

			options: {
				title: 'Completed',
			},
		}],
	},
}
```

{% endcode %}

When you run the app, you should now see 2 tabs on the main page like the screenshots below:

![Web](/files/QbTCy8rDC35StsgmE2IV) ![iOS](/files/c1u76lskfxYTcOG57XyT)

### Step 2: Tab Icons

Another thing we can do to make our UI pleasing is by adding icons to our tabs. This is done by:

* Adding `tabBarIcon` to `route.options`.
* Adding `tabBarOptions` to the `navigator`.

See the code below for example:

{% code title="src/routes.ts" %}

```jsx
{
	name: 'TasksApp',
	screen: Noop,
	path: '',
	exact: false,
	
	options: {
		title: 'My Tasks',
		headerRight: () => <TaskCreateButton />
	},
	
	navigator: {
		headerMode: 'none',
		type: 'tab',
	
		routes: [{
			exact: true,
			name: 'PendingTask',
			path: 'pending',
			screen: 'PendingTasksScreen',

			options: {
				title: 'Pending',
				tabBarIcon: ({ color }) => <Icon name="checkbox-multiple-blank-outline" color={color} />,
			},
		}, {
			exact: true,
			name: 'CompletedTasks',
			path: 'completed',
			screen: 'CompletedTasksScreen',

			options: {
				title: 'Completed',
				tabBarIcon: ({ color }) => <Icon name="checkbox-multiple-marked" color={color} />,
			},
		}],
	
		tabBarOptions: {
			showIcon: true,
			tabStyle: {
				flexDirection: 'row',
			},
		},
	},
}
```

{% endcode %}

![Web](/files/UwYzWaGcyhq08NFbuXQP) ![iOS](/files/UE0LFxBsLKwGrU0SQ5dT)
