Skip to content

refactor(ui): migrate Button to Base UI Button primitive - #828

Open
pasqualevitiello wants to merge 4 commits into
mainfrom
feat/base-ui-button
Open

refactor(ui): migrate Button to Base UI Button primitive#828
pasqualevitiello wants to merge 4 commits into
mainfrom
feat/base-ui-button

Conversation

@pasqualevitiello

Copy link
Copy Markdown
Contributor

Summary

  • Replace the custom useRender Button wrapper with @base-ui/react/button, keeping buttonVariants, sizes/variants, and the loading + Spinner behavior
  • Stop using <Button render={<Link|a />}> for links; style plain Link/a with buttonVariants instead (shadcn-aligned)
  • Style disabled states with data-disabled so focusableWhenDisabled loading buttons keep correct visuals; update call sites across ui, www, shared, calcom examples, and particles

Test plan

  • bun test packages/ui/test/components/button.test.tsx
  • Visually check default / outline / destructive / loading buttons
  • Confirm disabled + loading still look correct and loading remains focusable
  • Spot-check link-styled CTAs (home, not-found, docs nav, GitHub link, particle card “View code”)
  • Smoke calcom bookings list / attributes pages for link buttons

Made with Cursor

Replace the custom useRender wrapper with @base-ui/react/button and style links via buttonVariants instead of Button render={<Link />}, matching shadcn guidance. Disabled styles use data-disabled so focusableWhenDisabled loading states stay consistent.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
coss-com Ready Ready Preview Jul 30, 2026 3:23pm
coss-com-ui Ready Ready Preview Jul 30, 2026 3:23pm
coss-examples-calcom Ready Ready Preview Jul 30, 2026 3:23pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
coss-com-origin Skipped Skipped Jul 30, 2026 3:23pm

Request Review

Update Button docs, changelog, radix migration, and agent skills so links use buttonVariants instead of Button render.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the React.MouseEvent annotation so the handler accepts BaseUIEvent from @base-ui/react/button.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant