-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Description
Bug Description
The sidebar component uses incorrect Tailwind CSS syntax for CSS custom properties, causing the sidebar to have zero width and not display properly.
Current Behavior
The sidebar component uses syntax like:
w-(--sidebar-width)
w-(--sidebar-width-icon)
This syntax doesn't work with Tailwind CSS and results in the sidebar having 0px width.
Expected Behavior
The sidebar should use proper Tailwind CSS arbitrary value syntax:
w-[var(--sidebar-width)]
w-[var(--sidebar-width-icon)]
Affected Code Locations
In the sidebar.tsx
component, the following lines need correction:
- Line ~173:
w-(--sidebar-width)
→w-[var(--sidebar-width)]
- Line ~190:
w-(--sidebar-width)
→w-[var(--sidebar-width)]
- Line ~221:
w-(--sidebar-width)
→w-[var(--sidebar-width)]
- Line ~226:
w-(--sidebar-width-icon)
→w-[var(--sidebar-width-icon)]
- Line ~232:
w-(--sidebar-width)
→w-[var(--sidebar-width)]
- Line ~239:
w-(--sidebar-width-icon)
→w-[var(--sidebar-width-icon)]
Steps to Reproduce
- Install the sidebar component using the CLI or copy from the website
- Use the sidebar component in a Next.js app with the standard setup from docs
- The sidebar will render with 0px width
Environment
- Next.js 15
- Tailwind CSS 3.x
- React 19
Fix
Replace all instances of w-(--sidebar-width)
with w-[var(--sidebar-width)]
and w-(--sidebar-width-icon)
with w-[var(--sidebar-width-icon)]
in the sidebar component.
This ensures Tailwind CSS properly interprets the CSS custom properties.
tlawrie and viniciuspalma
Metadata
Metadata
Assignees
Labels
No labels