# Views

Views are the main screens in your application and are comprised of various components.

Gravity comes with pre-built views for you to use in your app, including:

* Auth views (sign up, sign in, reset password)
* Account views (profile, password, users)
* x2 dashboard templates

{% hint style="info" %}
Views are located in the `/views` directory
{% endhint %}

## Creating a New View

There is a `template.js` file inside the views directory that you can use to speed up the process of creating new views.

Your components within a view should always be wrapped inside a [**\<ViewContainer>**](https://docs.usegravity.app/gravity-native/views) which will provide common components such as header, navigation and banner notifications.&#x20;

## Routing the View

Once you've built your view, you need to import it into `/router.js` and add it to a [navigation stack](https://docs.usegravity.app/gravity-native/navigation).

## Private Views

You can restrict access to a view to a specific user permission level. For example: only account admins can access the edit users view.

Inside the router – each view has an `initialParams` object where you can add the user permission level, for example, in the `<AccountTabs/>` stack:

```javascript
<BottomTab.Screen name='users' component={ Users }
initialParams={{ private: true, permission: 'admin' }}/>
```

{% hint style="info" %}
You should also consider conditionally rendering stack objects to only show links to views the user has permission for.&#x20;
{% endhint %}
