Skip to content

Comments

fix(registry): remove cn-menu-target from installable components#9696

Open
eduardbar wants to merge 1 commit intoshadcn-ui:mainfrom
eduardbar:fix/9658-remove-cn-menu-target
Open

fix(registry): remove cn-menu-target from installable components#9696
eduardbar wants to merge 1 commit intoshadcn-ui:mainfrom
eduardbar:fix/9658-remove-cn-menu-target

Conversation

@eduardbar
Copy link

Summary

Fixes #9658.

The cn-menu-target class is a shadcn.com website-internal implementation detail — it exists only to allow design-system-provider.tsx to dynamically add/remove a dark class via JavaScript when the user selects the "inverted" menu color theme on the website.

This class has no meaning in user projects, but it was included in the installable registry components (dropdown-menu, context-menu, menubar, select, combobox) for both base-ui and radix variants, as well as their RTL counterparts and preview examples.

The effect in user code: any installed component with cn-menu-target becomes a target for external dark class injection if anyone happens to use the same class name — a silent, invisible side effect.

Changes

Removed cn-menu-target from all user-installable registry and example components (30 files total). The class is intentionally preserved in:

  • apps/v4/app/(create)/components/design-system-provider.tsx — where it is used
  • apps/v4/app/(create)/components/picker.tsx — website internal

Affected components

dropdown-menu, context-menu, menubar, select, combobox across:

  • registry/bases/base/ui/ (base-ui variants)
  • registry/bases/radix/ui/ (radix variants)
  • examples/base/ui/ and examples/base/ui-rtl/
  • examples/radix/ui/ and examples/radix/ui-rtl/

The cn-menu-target class is a shadcn.com website-internal implementation
detail used by design-system-provider.tsx to dynamically inject a dark
class for inverted menu color theming. It has no effect in user projects
and causes unexpected behavior when the dark class is added to installed
components at runtime.

Fixes shadcn-ui#9658
@vercel
Copy link
Contributor

vercel bot commented Feb 20, 2026

Someone is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

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.

[bug]: rogue dark class in dropdown-menu for base-ui

1 participant