Skip to content

chore: upgrade Tailwind 4.3 and sync shadcn/ui components#464

Merged
hari merged 5 commits into
mainfrom
chore/upgrade-shadcn-tailwind
May 21, 2026
Merged

chore: upgrade Tailwind 4.3 and sync shadcn/ui components#464
hari merged 5 commits into
mainfrom
chore/upgrade-shadcn-tailwind

Conversation

@hari
Copy link
Copy Markdown
Contributor

@hari hari commented May 21, 2026

Summary

  • Upgrade Tailwind CSS to 4.3 (tailwindcss, @tailwindcss/postcss, tailwind-merge) and bump shadcn-related deps (cmdk, @radix-ui/*, class-variance-authority)
  • Re-sync all 17 installed shadcn/ui primitives from the official registry (npx shadcn@latest add -o), keeping @radix-ui/react-* imports (no unified radix-ui migration)
  • Fix command palette (⌘K) dialog animation: remove legacy slide-in-from-* transforms on DialogContent that caused scale-from-top-left under Tailwind v4 + tw-animate-css
  • Add May 2026 changelog entry and docs nav entry

Test plan

  • yarn build passes
  • Open site, press ⌘K — command dialog fades/zooms from center (not top-left)
  • Smoke-test dialogs, dropdowns, sheets, and tabs in docs UI
  • Verify light/dark theme on updated primitives

Made with Cursor

Summary by CodeRabbit

  • Chores

    • Updated dependencies and toolchain (Tailwind CSS 4.3, tooling and UI package refresh).
    • Refreshed many component icons and updated component internals for consistency.
  • Style

    • Improved focus/outline behavior, spacing and responsive text sizing across UI components.
    • Enhanced scroll and overflow handling in menu/select surfaces.
  • Documentation

    • Added May 2026 changelog entry describing updates.

Review Change Stack

hari and others added 3 commits May 21, 2026 15:39
Bump tailwindcss, @tailwindcss/postcss, tailwind-merge, cmdk, and
@radix-ui/* to latest registry versions. Point shadcn:add at shadcn@latest.

Co-authored-by: Cursor <cursoragent@cursor.com>
Re-apply all installed primitives with shadcn@latest -o using @radix-ui
imports. Drop legacy slide transforms on DialogContent so the command
palette fades and zooms from center under Tailwind v4.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document Tailwind 4.3, official shadcn registry refresh, and the command
palette dialog animation fix. Register the month in docs nav and index.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dd5057f6-1203-460e-b0ff-c953ca2e9876

📥 Commits

Reviewing files that changed from the base of the PR and between 3ad9040 and 38cc1b5.

📒 Files selected for processing (6)
  • components/ui/card.tsx
  • components/ui/dropdown-menu.tsx
  • components/ui/select.tsx
  • components/ui/tooltip.tsx
  • content/docs/changelog/2026-05.mdx
  • content/docs/changelog/index.mdx
✅ Files skipped from review due to trivial changes (3)
  • content/docs/changelog/2026-05.mdx
  • components/ui/card.tsx
  • content/docs/changelog/index.mdx

📝 Walkthrough

Walkthrough

Migrate many shadcn/ui components from Radix icons to lucide-react, standardize focus/outline and spacing utilities, adjust component typings/structure (Input, CardTitle, Tooltip), improve select/dropdown scrolling, and update toolchain dependencies and changelog for May 2026.

Changes

UI Component Migration and Styling Overhaul

Layer / File(s) Summary
Icon System Migration to Lucide React
components/ui/accordion.tsx, components/ui/command.tsx, components/ui/dialog.tsx, components/ui/dropdown-menu.tsx, components/ui/select.tsx, components/ui/sheet.tsx
Replace Radix icon imports with lucide-react icons and update JSX rendering for triggers, close buttons, indicators, and inputs.
Focus and Outline Styling Standardization
components/ui/badge.tsx, components/ui/button.tsx, components/ui/command.tsx, components/ui/tabs.tsx, components/ui/dropdown-menu.tsx
Change outline-hiddenoutline-none, add gap-2 where applied, and add SVG sizing/pointer CSS selectors.
Command Component Refactor
components/ui/command.tsx
Simplify CommandDialog typing to DialogProps, switch CommandInput icon to Search, update item/triggers classNames, and reformat subcomponents while keeping displayName assignments.
Dialog Formatting and Close Button
components/ui/dialog.tsx
Update DialogOverlay/DialogContent class strings, replace close icon with X, and reformat header/footer/title/description components without changing props.
Select & Dropdown Layout and Scrolling
components/ui/select.tsx, components/ui/dropdown-menu.tsx
Switch from fixed max-height/hidden overflow to Radix variable-based available-height with overflow-y-auto; update content and item classes and scroll button icons.
Types and Mounting Adjustments
components/ui/input.tsx, components/ui/card.tsx, components/ui/tooltip.tsx
Use React.ComponentProps<"input"> for Input forwardRef (remove exported InputProps), correct CardTitle forwardRef generic to HTMLHeadingElement, and wrap TooltipContent with Portal.

Toolchain and Documentation Updates

Layer / File(s) Summary
Dependency and Script Updates
package.json
Change shadcn:add script to npx shadcn@latest add; bump multiple @radix-ui/react-* packages, tailwind-merge to ^3.6.0, cmdk, class-variance-authority, and upgrade dev deps tailwindcss/@tailwindcss/postcss to ^4.3.0.
Changelog and Config
config/docs.ts, content/docs/changelog/2026-05.mdx, content/docs/changelog/index.mdx
Add May 2026 changelog MDX documenting Tailwind 4.3, shadcn/ui registry refresh, CLI change, and DialogContent scaling fix; update sidebar and recent releases index.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • codse/animata#439: Related changelog/sidebar edits touching config/docs.ts and content/docs/changelog/index.mdx.
  • codse/animata#425: Prior Select styling changes touching components/ui/select.tsx with similar focus/foreground class adjustments.

Suggested reviewers

  • sudhashrestha

Poem

🐰 Lucide chevrons take their place,

outlines settle, measured, neat.
Inputs, cards, and tooltips find their space,
Tailwind hums an upgraded beat.
A hopping rabbit nods—components complete.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: upgrading Tailwind CSS to v4.3 and syncing shadcn/ui components from the official registry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/upgrade-shadcn-tailwind

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ad9040e67

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread components/ui/card.tsx Outdated
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 21, 2026

Deploying animata with  Cloudflare Pages  Cloudflare Pages

Latest commit: 38cc1b5
Status: ✅  Deploy successful!
Preview URL: https://342781cc.animata.pages.dev
Branch Preview URL: https://chore-upgrade-shadcn-tailwin.animata.pages.dev

View logs

The shadcn registry sync defaulted CardTitle and CardDescription to divs.
Use heading and paragraph elements again for screen-reader outline quality.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
components/ui/dropdown-menu.tsx (1)

59-76: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix Tailwind v4 CSS variable syntax.

Lines 68-69 use old Tailwind v3 bracket syntax for CSS variables. Tailwind v4 requires parentheses.

  • Line 68: max-h-[var(--radix-dropdown-menu-content-available-height)]max-h-(--radix-dropdown-menu-content-available-height)
  • Line 69: origin-[--radix-dropdown-menu-content-transform-origin]origin-(--radix-dropdown-menu-content-transform-origin)
🔧 Proposed fix
       className={cn(
-        "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
-        "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
+        "z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
+        "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-dropdown-menu-content-transform-origin)",
         className
       )}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/ui/dropdown-menu.tsx` around lines 59 - 76, The Tailwind v3
bracket CSS-variable syntax in the className of DropdownMenuContent is invalid
for Tailwind v4; update the affected utility tokens in the DropdownMenuContent
component so the CSS variable utilities use parentheses instead of square
brackets — replace max-h-[var(--radix-dropdown-menu-content-available-height)]
with max-h-(--radix-dropdown-menu-content-available-height) and
origin-[--radix-dropdown-menu-content-transform-origin] with
origin-(--radix-dropdown-menu-content-transform-origin) inside the cn(...) call
so the component's className uses the new Tailwind v4 syntax.
components/ui/select.tsx (1)

70-100: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix Tailwind v4 CSS variable syntax.

Lines 78 and 91 use old Tailwind v3 bracket syntax for CSS variables. Tailwind v4 requires parentheses without the var() wrapper.

  • Line 78: max-h-[--radix-select-content-available-height]max-h-(--radix-select-content-available-height)
  • Line 78: origin-[--radix-select-content-transform-origin]origin-(--radix-select-content-transform-origin)
  • Line 91: h-[var(--radix-select-trigger-height)]h-(--radix-select-trigger-height)
  • Line 91: min-w-[var(--radix-select-trigger-width)]min-w-(--radix-select-trigger-width)
🔧 Proposed fix
       className={cn(
-        "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
+        "relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-select-content-transform-origin)",
         position === "popper" &&
           "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
         className
       )}
       position={position}
       {...props}
     >
       <SelectScrollUpButton />
       <SelectPrimitive.Viewport
         className={cn(
           "p-1",
           position === "popper" &&
-            "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
+            "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
         )}
       >
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/ui/select.tsx` around lines 70 - 100, SelectContent uses Tailwind
v3 bracket syntax for CSS variables; update the className usages inside the
SelectPrimitive.Content and SelectPrimitive.Viewport in SelectContent to
Tailwind v4 parenthesis syntax: replace
"max-h-[--radix-select-content-available-height]" with
"max-h-(--radix-select-content-available-height)",
"origin-[--radix-select-content-transform-origin]" with
"origin-(--radix-select-content-transform-origin)",
"h-[var(--radix-select-trigger-height)]" with
"h-(--radix-select-trigger-height)", and
"min-w-[var(--radix-select-trigger-width)]" with
"min-w-(--radix-select-trigger-width)". Ensure changes are applied to the
className strings in the SelectContent component so Tailwind v4 recognizes the
CSS variables.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/ui/tooltip.tsx`:
- Line 23: The Tailwind origin utility uses v4 parentheses for CSS-variable
arbitrary values; replace the v3-style token
origin-[--radix-tooltip-content-transform-origin] in the tooltip component's
class list (the string containing "z-50 ...
origin-[--radix-tooltip-content-transform-origin]") with the v4 syntax
origin-(--radix-tooltip-content-transform-origin) so the origin utility is
applied correctly (update the class string in the Tooltip/TooltipContent JSX
where that token appears).

In `@content/docs/changelog/2026-05.mdx`:
- Line 7: Update the changelog text to use the shadcn registry URL pattern
instead of the bare CLI add command: replace occurrences of "npx shadcn@latest
add <component> -o" (and any plain "npx shadcn add component-name") with the
registry URL format "https://animata.design/r/{category}/{name}.json" and update
the `shadcn:add` mention to reference the registry URL usage; ensure all
examples in the paragraph and any inline code spans follow the registry URL
pattern per the docs guideline.
- Line 3: Update the frontmatter "description" to accurately reflect the
migration strategy described in the body: replace "unified Radix imports" with
wording that indicates per-package `@radix-ui/react-`* imports were retained
(e.g., "Tailwind CSS 4.3 and shadcn/ui component refresh with per-package
`@radix-ui/react-`* imports retained") so the description matches the content in
content/docs/changelog/2026-05.mdx.

In `@content/docs/changelog/index.mdx`:
- Line 17: Replace the bare CLI mention in the changelog sentence that currently
reads like "shadcn registry went live — every component installable with `npx
shadcn add`" to the required registry URL pattern; update the text to reference
the registry URL format "https://animata.design/r/{category}/{name}.json" (use
that pattern in place of the bare `npx shadcn add` wording) so the changelog
entry uses the correct shadcn registry URL format.

---

Outside diff comments:
In `@components/ui/dropdown-menu.tsx`:
- Around line 59-76: The Tailwind v3 bracket CSS-variable syntax in the
className of DropdownMenuContent is invalid for Tailwind v4; update the affected
utility tokens in the DropdownMenuContent component so the CSS variable
utilities use parentheses instead of square brackets — replace
max-h-[var(--radix-dropdown-menu-content-available-height)] with
max-h-(--radix-dropdown-menu-content-available-height) and
origin-[--radix-dropdown-menu-content-transform-origin] with
origin-(--radix-dropdown-menu-content-transform-origin) inside the cn(...) call
so the component's className uses the new Tailwind v4 syntax.

In `@components/ui/select.tsx`:
- Around line 70-100: SelectContent uses Tailwind v3 bracket syntax for CSS
variables; update the className usages inside the SelectPrimitive.Content and
SelectPrimitive.Viewport in SelectContent to Tailwind v4 parenthesis syntax:
replace "max-h-[--radix-select-content-available-height]" with
"max-h-(--radix-select-content-available-height)",
"origin-[--radix-select-content-transform-origin]" with
"origin-(--radix-select-content-transform-origin)",
"h-[var(--radix-select-trigger-height)]" with
"h-(--radix-select-trigger-height)", and
"min-w-[var(--radix-select-trigger-width)]" with
"min-w-(--radix-select-trigger-width)". Ensure changes are applied to the
className strings in the SelectContent component so Tailwind v4 recognizes the
CSS variables.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c3c3ce59-8aa3-4cf2-a076-11e99b8ce86a

📥 Commits

Reviewing files that changed from the base of the PR and between c35edbb and 3ad9040.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (16)
  • components/ui/accordion.tsx
  • components/ui/badge.tsx
  • components/ui/button.tsx
  • components/ui/card.tsx
  • components/ui/command.tsx
  • components/ui/dialog.tsx
  • components/ui/dropdown-menu.tsx
  • components/ui/input.tsx
  • components/ui/select.tsx
  • components/ui/sheet.tsx
  • components/ui/tabs.tsx
  • components/ui/tooltip.tsx
  • config/docs.ts
  • content/docs/changelog/2026-05.mdx
  • content/docs/changelog/index.mdx
  • package.json

Comment thread components/ui/tooltip.tsx Outdated
Comment thread content/docs/changelog/2026-05.mdx Outdated
Comment thread content/docs/changelog/2026-05.mdx Outdated
Comment thread content/docs/changelog/index.mdx Outdated
Use parenthesis arbitrary values for dropdown, select, and tooltip Radix
CSS variables. Update changelog copy to registry URL format and accurate
Radix import description per docs guidelines.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hari hari merged commit b0c1194 into main May 21, 2026
6 checks passed
@hari hari deleted the chore/upgrade-shadcn-tailwind branch May 21, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant