Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dip/cmdk/llms.txt
Use this file to discover all available pages before exploring further.
Command.List is the listbox container for all Command.Item, Command.Group, and Command.Separator components. It handles scroll behavior and exposes a CSS variable you can use to animate the height as results change.
[cmdk-list]
Props
Accessible label for the listbox. Set as
aria-label on the underlying element. Not shown visually. Change this if the default “Suggestions” label doesn’t describe your use case.div props are forwarded to the underlying element.
CSS variable: --cmdk-list-height
Command.List automatically tracks the height of its inner content using a ResizeObserver and exposes the value as the --cmdk-list-height CSS variable on [cmdk-list]. Use this to animate the list height smoothly as the number of visible results changes:
The
--cmdk-list-height variable reflects the height of the inner content wrapper, not the scroll container itself. Pair it with min-height and max-height to keep the list bounded.Scroll padding
When an item is scrolled into view near the top or bottom edge of the list, it can appear flush against the boundary. Usescroll-padding to add breathing room:
Accessibility
Command.List renders with role="listbox" and maintains aria-activedescendant pointing to the currently selected item’s id. The label prop sets aria-label on the element to describe the list to screen readers.