cmdk
cmdk copied to clipboard
feat: allow overwriting props
There are many cases where it makes sense to override the props of the components.
Examples:
-
aria-label
of e.g.CommandLoading
andCommandList
to support multi language -
aria-expanded
ofCommandInput
, which is alwaystrue
currently, but should only betrue
, when the input has focus or after typing, when the list is shown -
type
ofCommandInput
to let users only insert numbers for instance
There is already a PR for it #117, but I created a new one #202
Here is a code sandbox, where we can see the problem
Maybe we can realize it?
Would be very useful.
Glad to see @gylxan that someone also pick up the topic with overwriting props. For me the most important part is with type of command input. Topic also arise in #175 and for me the crucial part with changing type is that on mobile I can force browser to use specific type of keyboard :)