VOOZH about

URL: https://www.geeksforgeeks.org/reactjs/react-suite-container-sidebar-layout/

⇱ React Suite Container Sidebar Layout - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

React Suite Container Sidebar Layout

Last Updated : 25 Jul, 2022

React Suite is a library of React components, sensible UI design, and a friendly development experience. It is supported in all major browsers. It provides pre-built components of React which can be used easily in any web application.

In this article, we'll learn about React Suite Container Sidebar Layout. The container layout can define the main frame of the page using header, content, sidebar, and footer components. The sidebar is used to provide side navigation functionality to the users.

Syntax:

<Container>
 <Sidebar>...</Sidebar>
 <Header>Header</Header>
 <Content>Content</Content>
 <Footer>Footer</Footer>
</Container>

Creating React Application And Installing Module:

Step 1: Create a React application using the given command:

npm create-react-app projectname

Step 2: After creating your project, move to it using the given command:

cd projectname

Step 3: Now Install the rsuite node package using the given command:

npm install rsuite

Project Structure: Now your project structure should look like the following:

👁 Image
 

Example 1: Below example demonstrates the basic sidebar layout.


Step to Run Application: Run the application using the following command from the project's root directory.

npm start

Output: Now open your browser and go to http://localhost:3000/, you will see the following output:

👁 Image
 

Example 2: Below example demonstrates the sidebar layout with side navigation.

Output:

👁 Image
 

Reference: https://rsuitejs.com/components/container/#sidebar-layout

Comment