For the complete documentation index, see llms.txt. This page is also available as Markdown.

Views

Gravity has a custom <View> component that serves two purposes:

  1. Houses global components that are common to all views like notification and modal.

The View component is a wrapper around all of your UI views and can show a modal, create a banner notification or handle an error from anywhere in your application.

Creating New Views

To add a new view to your application, you add a new view file in the /client/src/views directory and add a new route in Node.js.

In Next.js you create a new page.jsx file inside the /src/app folder.

You can also generate new views quickly using the toolbelt.

Last updated