Layout

Gravity Web offers four versatile layout options. Layouts contain the common components to be rendered across all views that utilise that layout, for example: navigation and header.

Preview

Account Layout

Gravity account layout component

App Layout

Gravity app layout component

Auth Layout

Gravity auth layout component

Onboarding Layout

Gravity onboarding layout component

Props

Prop
Description
Required
Value

children

children to render

required

component(s)

title

view title

required

string

Usage

You can use a layout by passing its name in the route object.

{
    path: '/dashboard',
    view: Dashboard,
    layout: 'app',
    title: 'account.index.title'
}

Last updated

Was this helpful?