Friday, October 10, 2025
HomeLanguagesReact Suite Dropdown Menu items

React Suite Dropdown Menu items

React Suite is a popular front-end library with a set of React components that are designed for the middle platform and back-end products. The dropdown component allows the user to provide navigation that uses a select picker if you want to select a value. 

Dropdown Menu is used to create a menu with some items. It appears as a card containing items. We don’t need to expand it as it is already expanded.

Syntax

<Dropdown.Menu>
    <Dropdown.Item>Item 1</Dropdown.Item>
    <Dropdown.Item>Item 2</Dropdown.Item>
</Dropdown.Menu>

Creating React Application And Installing Module:

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

npx create-react-app foldername

Step 2: After creating your project folder i.e. foldername, move to it using the following command:

cd foldername

Step 3: After creating the ReactJS application, Install the required module using the following command:

npm install rsuite

Project Structure: It will look like the following.

 

Example 1: Now write down the following code in the App.js file. Here, App is our default component where we have written our code. In this example, we will learn to create an easy and simple Dropdown menu 

Javascript




import React from 'react';
import Dropdown from 'rsuite/Dropdown';
import ButtonToolbar from 'rsuite/ButtonToolbar';
import 'rsuite/dist/rsuite.min.css';
  
import Link from '@mui/material/Link';
function App() {
    return (
        <div>
            <h1 style={{ color: 'green' }}>
                neveropen
            </h1>
            <h3>React Suite Menu Items</h3>
  
            <Dropdown.Menu
                style={{
                    width: 200,
                    border: '1px solid #ddd'
                }}>
                <Dropdown.Item >Item A</Dropdown.Item>
                <Dropdown.Item >Item B</Dropdown.Item>
                <Dropdown.Item >Item C</Dropdown.Item>
            </Dropdown.Menu>
            <br></br>
        </div>
    )
}
  
export default App;


Step to Run Application: Run the application using the following command from the root directory of the project:

npm start

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

 

Example 2: In this example, we will learn how we can provide some styling to the menu and menu items. In below example, we will provide green color as a background to the Menu and white color to the font of Menu Items.

Javascript




import React from 'react';
import Dropdown from 'rsuite/Dropdown';
import ButtonToolbar from 'rsuite/ButtonToolbar';
import 'rsuite/dist/rsuite.min.css';
  
import Link from '@mui/material/Link';
function App() {
    return (
        <div>
            <h1 style={{ color: 'green' }}>
                neveropen
            </h1>
            <h3>React Suite Menu Items</h3>
  
            <Dropdown.Menu
                style={{
                    width: 200,
                    border: '1px solid #ddd',
                    background: 'green'
                }}>
                <Dropdown.Item style={{ color: 'white' }}>
                    Geeks
                </Dropdown.Item>
                <Dropdown.Item style={{ color: 'white' }}>
                    For
                </Dropdown.Item>
                <Dropdown.Item style={{ color: 'white' }}>
                    Geeks
                </Dropdown.Item>
            </Dropdown.Menu>
        </div>
    )
}
  
export default App;


Output:

 

Reference: https://rsuitejs.com/components/dropdown/#menu-items

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
Previous article
Next article
RELATED ARTICLES

Most Popular

Dominic
32348 POSTS0 COMMENTS
Milvus
87 POSTS0 COMMENTS
Nango Kala
6715 POSTS0 COMMENTS
Nicole Veronica
11878 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11941 POSTS0 COMMENTS
Shaida Kate Naidoo
6837 POSTS0 COMMENTS
Ted Musemwa
7097 POSTS0 COMMENTS
Thapelo Manthata
6792 POSTS0 COMMENTS
Umr Jansen
6791 POSTS0 COMMENTS