react-select icon indicating copy to clipboard operation
react-select copied to clipboard

tailwind and react-select don't work

Open MrOxMasTer opened this issue 2 years ago • 2 comments

Thanks for using react-select!

I tried classNamePrefix and className prop through the object, but it still doesn't work in any way. I tried to define classes in the global.css class Name Prefix file, for example a controller or something else, but the styles still didn't work. Maybe you can fix it? I tried on version @5 as well.7.4 and on @5.7.0, but still does not work

MrOxMasTer avatar Jul 15 '23 19:07 MrOxMasTer

Is this a specificity issue? Below worked for me.

***** component *****

<Select
    value={selected}
    onChange={handleSelected}
    options={options}
    className='_select'
    classNamePrefix='_select'
/>


***** global.css *****

@layer components {
  ._select {
    @apply w-full;
  }
  ._select ._select__control {
    @apply bg-base-gray-900;
  }
}

shanestreator avatar Jan 04 '24 18:01 shanestreator