Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
How to display overflowing items as a dropdown while mapping a list of items in react js

I have a react app & I'm dividing my screen into two as shown below.

 <div className="App">
      <div className="left">
        {items.map((item) => (
          <h4>{item}</h4>
        ))}
      </div>
      <div className="right">
        {products.map((product) => (
          <span>{product}</span>
        ))}
      </div>
    </div>

In the left side Im displaying a list of h4 tags while mapping through a list and displaying it as row. On the right side I'm displaying a list of products as column.

The styling is below

.App {
  height: 100%;
  width: 100%;
  background-color: aquamarine;
  display: flex;
}

.left {
  width: 50%;
  background-color: red;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
.left h4 {
  padding-right: 1rem;
}

.right {
  width: 50%;
  display: flex;
  flex-direction: column;
}

Currently, the item list is overflowing and what I want is to display the overflowing items as a dropdownlist when we hover over to the end of the left div

Is there a way to do that?

The codesandbox is below

https://codesandbox.io/s/fervent-raman-0rywqt?file=/src/styles.css:0-304

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!