Repository navigation
Upgrade shadcn/ui to Base UI and refresh the /shadcn-ui showcase - #9
Merged
Merged
Conversation
…howcase Components - Regenerate all components with shadcn 4.23 in the base-vega style on Base UI (@base-ui/react), shadcn/ui's default since July 2026. Radix UI is removed entirely. - Add field, input, label, separator, skeleton, spinner, tooltip and empty - Migrate to shadcn's `cn` package (replaces clsx + tailwind-merge) via `shadcn migrate cn`; lib/utils re-exports it - components.json: base-vega style, slate base color, Tailwind v4 (no JS config), correct @/lib/utils alias Theme - Current shadcn theme format: oklch tokens in :root/.dark mapped with @theme inline, keeping the template's blue primary, radius and font - tw-animate-css replaces tailwindcss-animate (never loaded, so dialog animations never ran) and shadcn/tailwind.css adds Base UI's data-* variants - shadcn colors, radius and keyframes move out of tailwind.config.ts Integration - TooltipProvider at the app root - DataTable uses theme tokens and no longer requires getCoreRowModel - asChild -> render, onSelect -> onClick, grouped menu labels, and links styled with buttonVariants (Base UI's Button forces role="button") /shadcn-ui page - Showcases ServiceStack integration: live Hello API, CreateTodo validation errors in Field/FieldError, and GetWeatherForecast in DataTable with a row DropdownMenu that opens a Sheet - Fixes stale content: installed components listed from the ui folder, CLI install steps, made-up stats removed, no hard-coded slate overrides - Adds theming swatches, button sizes with tooltips, Dialog and Sheet Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the template's shadcn/ui components to the current release and rebuilds the
/shadcn-uipage around this template's ServiceStack integration.Base UI instead of Radix UI
Base UI has been shadcn/ui's default component library since July 2026. It's built by the team that originally made Radix. Radix isn't deprecated, but new projects start on Base UI, so the template now does too.
shadcn@4.23.0in thebase-vegastyle. Vega is described as "the classic shadcn/ui look", the closest match to before.@base-ui/reactreplaces Radix UI, which is removed entirely (noradix-uior@radix-ui/*packages, including transitive ones).field,input,label,separator,skeleton,spinner,tooltip,empty.cnnow comes from shadcn'scnpackage (a drop-in forclsx+tailwind-merge), migrated withnpx shadcn migrate cn.@/lib/utilsre-exports it.components.jsonusesbase-vega, slate, Tailwind v4 CSS-only config and the correct@/lib/utilsalias. Previously the alias pointed at a nonexistent@/utils.shadcn initwasn't used for the switch. On a scratch copy it deleted the helpers inlib/utils.ts, reset the theme and changed the site font, so the equivalent changes were made by hand.Theme
oklchtokens in:root/.dark, mapped with@theme inline. Chart and sidebar tokens are included.0.5remradius and font are kept. Computed styles outside the components (body, borders, container widths, blog typography,link-dark) were measured before and after and are unchanged.tw-animate-cssreplacestailwindcss-animate. The old package was a Tailwind v3 plugin that was never loaded, so dialog animations never ran onmain.shadcn/tailwind.cssprovides thedata-open/data-closed/ ... variants the Base UI components use.tailwind.config.tsinto CSS. The config keeps only the template's typography, container andlink-darksettings.Code changes for Base UI's API
asChildbecomesrender={<Button />}, includingPlugin.tsxand its code sample in the 2023 JavaScript blog post.DropdownMenuItemusesonClickinstead ofonSelect. ADropdownMenuLabelmust be inside aDropdownMenuGroup; otherwise Base UI throws error #31.Accordiondropstype="single"/collapsible, since that's the default.buttonVariants()on a plain<a>. Base UI'sButtonalways setsrole="button", which hides the link role, and shadcn's docs warn against it.TooltipProvideris added at the app root.DataTableuses theme tokens instead of hard-codedgray/indigo/yellowrow colors, and no longer requires callers to passgetCoreRowModel./shadcn-uipageNew sections showing integration with this template:
Hellois called as you type, with aSkeletonwhile loading.CreateTodo's[ValidateNotEmpty]error appears inField/FieldError, witharia-invalidstyling.GetWeatherForecastinDataTable, with a rowDropdownMenuthat opens aSheet, plusEmpty/Skeletonstates.Spinnerloading button, and Dialog and Sheet demos.Stale content fixed:
src/components/ui.npx shadcn@latest add.slate/grayoverrides that defeated theming are removed, as is a<main>nested inside the layout's<main>.Verification
npm run check(0 errors),npm run test:run,npm run build<a>, blog post dialog. No page errors.Notes
TooltipProviderincludes Base UI's positioning code. The/shadcn-uipage chunk is 148 kB, mostly TanStack Table, and only loads on that route.npm install. Vite serves outdated pre-bundled dependencies (HTTP 504) until it's restarted.🤖 Generated with Claude Code