pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
9.03k stars 258 forks source link

Add Link component #258

Open arjendevos opened 1 month ago

arjendevos commented 1 month ago

Currently I can add a Link component like this:

<CommandItem variant="muted">
  <Link className="grow" href="/settings">
    <Cog6ToothIcon className="mr-2 size-4" />
    settings
  </Link>
</CommandItem>

However I have a few requests:

Willem-Jaap commented 1 month ago

I ran into the same issue, currently I do this: image

I read in https://github.com/pacocoursey/cmdk/blob/main/ARCHITECTURE.md you don't want to support render props. this is just an idea but maybe you can provide an as prop for passing custom link components like next/link image