Tailwind v4 + Radix UI (shadcn) Dropdown/Select Transparent After Upgrade #17137
Replies: 3 comments
-
Same problem here! |
Beta Was this translation helpful? Give feedback.
-
@androidStern @MbBrainz Hello ~ Have you tried the official upgrade command, you can use Upgrade Tool: npx @tailwindcss/upgrade I encountered a similar issue when upgrading from Tailwind Additionally, Tailwind You can refer to this repo nextjs-nextra-starter and Commits |
Beta Was this translation helpful? Give feedback.
-
Same problem here. Total mystery... |
Beta Was this translation helpful? Give feedback.
-
Tailwind v4 + Radix UI (shadcn) Dropdown/Select Transparent After Upgrade
Body:
I recently upgraded a Next.js 14.2 project from Tailwind v3 to Tailwind v4. After the upgrade, several Radix UI components (from [shadcn/ui](https://github.com/shadcn/ui)), including the
Select
dropdown, started rendering fully transparent. The dropdown menu is visible as text floating on the page, with no background panel at all.Here’s a minimal snippet of one of the affected components (
InviteUserForm
), showing how I’m usingRadix
Select
with shadcn’s utility components:What I’ve observed:
bg-popover
or similar classes are present, but no actual background color is applied.globals.css
with custom@layer base { :root { ... } }
for shadcn’s theme variables, and I do see--popover: 0 0% 100%;
for white, but it’s not showing up.!important
rules like:element {
background-color: #fff !important;
}
Still shows transparent.
Has anyone encountered Tailwind v4 + Radix UI dropdowns rendering invisible backgrounds? Am I missing some new v4 config or a known fix for these theme variables? Any guidance or best practices for making the
SelectContent
background appear properly would be greatly appreciated!Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions