unstale

npm / shadcn

shadcn

What changed in shadcn 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

6 breaking3 security7 deprecations51 new APIs and options14 behavior and defaults8 tooling40 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

shadcn 4103 changes

Breaking changes 4

  • Zod errors expose issues instead of errors.

    4.22.0release notes

  • shadcn/schema and @shadcn/registry/schema now export Zod 4 schemas. They no longer typecheck with Zod 3's z; on Zod 3, use the exported types and schema methods instead of z.infer and z.array.

    4.22.0release notes

  • Initialization installs cn and generates a lib/utils export; registry components import cn from the package.

    4.21.0release notes

  • Radius calculations use multiplication instead of addition.

    4.0.0release notes

Security 3

  • Custom registry headers are dropped on cross-origin redirects to prevent credential leakage.

    4.13.1release notes

  • File paths for registry items without an explicit target are validated to prevent path traversal.

    4.13.1release notes

  • Registry-supplied dependency strings can no longer inject flags during install.

    4.13.1release notes

Deprecations 7

New APIs and options 43

Behavior and default changes 12

  • Validation messages now use Zod 4's wording.

    4.22.0release notes

  • Skips npm audit and the funding check when installing or removing dependencies, or creating a project.

    4.21.2release notes

  • GitHub registries support private repositories using GitHub CLI credentials or GH_TOKEN.

    4.19.0release notes

  • Registries from package.json and components.json are merged, and registries can be added to package.json when components.json is absent.

    4.18.0release notes

  • shadcn add, search, view, and init resolve registries from package.json in memory without persisting them to components.json.

    4.18.0release notes

  • Results now include registry item titles, and fuzzy matching uses those titles.

    4.16.2release notes

  • Search params are forwarded to registries to support server-side dynamic search.

    4.16.1release notes

  • base-ui is now the default.

    4.13.0release notes

  • The search command is improved.

    4.11.0release notes

  • Registry fetches send User-Agent: shadcn so servers using HTTP content negotiation can reliably serve JSON to the CLI.

    4.3.1release notes

  • getTailwindCssFile falls back to config.tailwind.css.

    4.0.0release notes

  • The info command outputs LLM-friendly output.

    4.0.0release notes

Tooling 6

  • Adds a command to replace clsx, tailwind-merge, and cnfast in Tailwind CSS v4 projects.

    4.20.0release notes

  • Adds support for icon migration.

    4.14.0release notes

  • The info command now includes preset information.

    4.6.0release notes

  • Templates can now be scaffolded from GitHub remotes.

    4.0.2release notes

  • Warns when running in a monorepo without cwd set.

    4.0.0release notes

  • Adds support for installing hooks, lib, and ui for workspaces.

    4.0.0release notes

Fixes and other changes 28

  • Search and list results now show the add command instead of [object Promise].

    4.21.5release notes

  • Font items skip editing the layout with a warning when the edit cannot be made safely, instead of writing a broken layout.

    4.21.4release notes

  • The config edit is skipped with a warning when it cannot be made safely, instead of writing a broken config.

    4.21.4release notes

  • Fixes ERR_REQUIRE_CYCLE_MODULE when running the CLI with pnpm dlx on Windows.

    4.21.3release notes

  • Accepts components.json files that start with a UTF-8 byte order mark.

    4.21.2release notes

  • Accepts package.json files that start with a UTF-8 byte order mark.

    4.21.2release notes

  • Only rewrites links on the ui.shadcn.com host.

    4.21.1release notes

  • Fixes reduced motion handling when shimmer is used with a variant.

    4.21.1release notes

  • Preserves leading comments when running the command.

    4.20.1release notes

  • The official shadcn/ui website was added to the package metadata.

    4.19.1release notes

  • File scans skip unreadable directories instead of failing with EACCES.

    4.18.0release notes

  • Monorepo target resolution skips unreadable directories.

    4.18.0release notes

  • Fixes shadcn behavior for projects with unreadable permission files.

    4.18.0release notes

  • Creates nested output directories before writing when registry item names contain path segments, preventing ENOENT failures.

    4.16.1release notes

  • Preserves existing dependency specifiers in package.json when running the command.

    4.11.1release notes

  • RTL transforms preserve quotes in className literals.

    4.8.3release notes

  • Template handling was updated.

    4.8.3release notes

  • An error now suggests using the previous version.

    4.7.0release notes

  • Fixes apply in monorepos.

    4.6.0release notes

  • Fixes chartColor in presets.

    4.4.0release notes

  • Registry fetches send an Accept header so servers using HTTP content negotiation can reliably serve JSON to the CLI.

    4.3.1release notes

  • Runs template post-init hooks only for newly created projects.

    4.3.1release notes

  • Bundles @antfu/ni and tinyexec to fix a missing module error when using npx.

    4.0.8release notes

  • Handling of init URLs was updated.

    4.0.5release notes

  • Fixed Apple metadata files in the template.

    4.0.1release notes

  • Fixed an issue resolving fallback styles.

    4.0.1release notes

  • Changes handling of the apply directive inside a utility.

    4.0.0release notes

  • Fixes keyboard key display in the tooltip.

    4.0.0release notes

shadcn 326 changes

Breaking changes 2

New APIs and options 8

Behavior and default changes 2

  • App names are now validated when creating an app.

    3.6.3release notes

  • Adding themes no longer installs the base style.

    3.5.1release notes

Tooling 2

Fixes and other changes 12

  • Fixes handling of nested aschild transforms.

    3.8.5release notes

  • Uses tw-merge for transform-style classes, improving how conflicting styles are merged.

    3.8.3release notes

  • Already installed fonts are now properly detected.

    3.8.1release notes

  • Skips all transforms for universal registry items.

    3.8.0release notes

  • Fixed the resolver for URLs.

    3.6.1release notes

  • Prevents duplicate keyframes when adding components.

    3.5.2release notes

  • Fixes handling of base styles when using the add command.

    3.5.2release notes

  • Updates color value detection for cssVars.

    3.5.1release notes

  • Fixes the utils import transform when a workspace alias does not start with @.

    3.5.1release notes

  • Fixes a regression with universal item detection.

    3.4.2release notes

  • Fixed adding a registry item that uses CSS at-property.

    3.4.1release notes

  • Fixed support for universal registry items that have dependencies but no files.

    3.4.1release notes