cmdk icon indicating copy to clipboard operation
cmdk copied to clipboard

feat: allow overwriting props

Open gylxan opened this issue 1 year ago • 2 comments

There are many cases where it makes sense to override the props of the components.

Examples:

  • aria-label of e.g. CommandLoading and CommandList to support multi language
  • aria-expanded of CommandInput, which is always true currently, but should only be true, when the input has focus or after typing, when the list is shown
  • type of CommandInput 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?

gylxan avatar Jan 09 '24 10:01 gylxan

Would be very useful.

MatchuPitchu avatar Jan 09 '24 12:01 MatchuPitchu

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 :)

albertAS61 avatar Feb 09 '24 23:02 albertAS61