Landing

This section provides guidance on laying out a landing page.

Overview

Landing layout is a type of web page design that is specifically created to promote a product, service, or event and encourage visitors to take a specific action, such as making a purchase, signing up for a newsletter, or registering for an event. The layout is designed to be visually appealing and persuasive, with a clear call-to-action (CTA) that guides visitors towards the desired goal.

How to use

Here we use landing layout. The installation method is as follows below.

Landing layout use mode Per-Page Layouts

Landing layout component is split into several sections:

  • Header: Component which represents the main navigation bar of the layout.

  • Main: Contains the content of each page and all prop passed from the page component.

  • Footer: Component which represents the footer of the layout.

Step 1: Create the layout split component

First, create a few new files in src/layouts/LandingLayout directory. This will be the parent folder component that wraps around each component layout.

layouts/LandingLayout
β”œβ”€β”€ Header
β”‚   β”œβ”€β”€ <another split code>
β”‚   └── index.tsx
β”œβ”€β”€ Main
β”‚   β”œβ”€β”€ <another split code>
β”‚   └── index.tsx
β”œβ”€β”€ Footer
β”‚   β”œβ”€β”€ <another split code>
β”‚   └── index.tsx
└── index.tsx

In each split it can be chunked again into smaller code sections.

Step 2: Create the parent layout component

Next, create a new file for parent layout component, such as index.tsx, also in your src/layouts/LandingLayout directory.

Step 3: Create the Page Component

Next, create a new file for your page component, such as index.tsx, also in your src/components/page/Homepage directory. This component will be wrapped by the LandingLayout component.

Step 4: Add the Page to Your App

Finally, create a new file for your page component, such as index.tsx, also in your src/pages directory.

Last updated