shadcn@4.21.0

shadcn-ui/uishadcn@4.21.0Sep 4, 2026by github-actions[bot]

AI Summary

Introduces a dedicated `cn` utility package for class merging and updates internal tooling to utilize it, streamlining utility management across the project.

Key Highlights

  • Generation of a dedicated `cn` package with automatic imports for `lib/utils`
  • Internal migration to use `twMerge` directly from the `cn` package

New Features

  • Automatic `cn` utility package generation during initialization

Full Release Notes

### Minor Changes

- [#11758](https://github.com/shadcn-ui/ui/pull/11758) [`c257f688cf4de7ec10cc1be84cad29cd4631182c`](https://github.com/shadcn-ui/ui/commit/c257f688cf4de7ec10cc1be84cad29cd4631182c) Thanks [@shadcn](https://github.com/shadcn)! - install `cn` and generate `export { cn } from "cn"` for `lib/utils` on init. Registry components now import `cn` from the `cn` package.

### Patch Changes

- [`8720dec73f5aebed9f649ea58636f54599fdedf1`](https://github.com/shadcn-ui/ui/commit/8720dec73f5aebed9f649ea58636f54599fdedf1) Thanks [@shadcn](https://github.com/shadcn)! - use `twMerge` from `cn` instead of `tailwind-merge` internally.