Customized
This section provides guidance on laying out a customized page.
Overview
Customized layout is a user interface design that is tailored to the specific needs and preferences of a particular user or group of users. It is often used in software applications, websites, and other digital products to provide a personalized experience that meets the unique requirements of each user.
How to use
Here we use customized layout. The installation method is as follows below.
Customized 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/CustomizedLayout directory. This will be the parent folder component that wraps around each component layout.
layouts/CustomizedLayout
βββ Header
β βββ <another split code>
β βββ index.tsx
βββ Main
β βββ <another split code>
β βββ index.tsx
βββ Footer
β βββ <another split code>
β βββ index.tsx
βββ index.tsxIn 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/CustomizedLayout 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 CustomizedLayout 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