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

290
Views
Make React Select horizontally scrollable on overflow

How can I make a React Select (specifically multiselect) component be able to scroll horizontally when the box overflows? I've tried

<Select
    // some other props
    styles={{
      valueContainer: (base) => ({
        ...base,
        overflowX: 'scroll',
      }),
    }}
    isMulti
/>

but that does not work. I am using React and Tailwind CSS.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

I am not sure this will work, and it's also a bit hacky:

styles={{
      valueContainer: (base) => ({
        ...base,
        overflowX: 'scroll',
        flexWrap: 'unset',
      }),
      multiValue: (base) => ({
        ...base,
        flex: '1 0 auto',
      })
    }}

Please note that this will introduce new problems with scrollbars - on windows I assume the scrollbars will be visible permanently and mess with the layout, while on a Mac, the scrollbars will only appear while scrolling but then hide most of the content of the select value container.

about 4 years ago · Juan Pablo Isaza Report

0

If you are using Tailwind CSS then you can simply add the className='overflow-x-scroll' to enable horizontal scrolling.

<Select
    // some other props
    styles={{
      valueContainer: (base) => ({
        ...base,
        overflowX: 'scroll',
      }),
    }}
    isMulti
    className='overflow-x-scroll'
/>
about 4 years ago · Juan Pablo Isaza Report
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!