Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#391·cmdk

Hidden <label> inserted by cmdk breaks layout inside flex containers & popovers

Author: matejmichCreated Dec 11, 2025Updated Feb 3, 2026

When using cmdk (via shadcn/ui’s <Command />) inside a flex container or popover, the automatically inserted hidden <label cmdk-label> element causes the layout to break.

Even though the label is visually clipped, the browser still measures it, which results in:

parent flex containers stretching

scroll regions collapsing

popovers miscalculating their anchor position

full-page white-out / layout shift

This happend inside nested flex layout with auto height for me. Don't know if that's relevant/

Work around

<Command className="[&>label]:hidden"> this fixed the issue

Source: dip/cmdk

View original on GitHubView discussion on GitHub