sek-consulting / solid-ui

Beautifully designed components. Built with Kobalte & corvu. Styled with Tailwind CSS.
https://www.solid-ui.com
MIT License
674 stars 25 forks source link

⌘K port for SolidJS #75

Closed create-signal closed 2 months ago

create-signal commented 2 months ago

I've published a port of ⌘K, which shadcn/ui uses for it's "Command" component, to SolidJS at https://github.com/create-signal/cmdk-solid

The notable difference between this and the combobox approach is the composable API, which may be more familiar to users switching to SolidJS + SolidUI from React + shacn/ui

e.g.

<Command.Dialog open={open()} onOpenChange={setOpen}>
  <Command.Input />
  <Command.List>
    <Show when={loading()}>
      <Command.Loading>Hang on…</Command.Loading>
    </Show>
    <Command.Empty>No results found.</Command.Empty>
    <Command.Group heading="Fruits">
      <Command.Item>Apple</Command.Item>
      <Command.Item>Orange</Command.Item>
      <Command.Separator />
      <Command.Item>Pear</Command.Item>
      <Command.Item>Blueberry</Command.Item>
    </Command.Group>
    <Command.Item>Fish</Command.Item>
  </Command.List>
</Command.Dialog>

I'm happy to prepare a pull request if you're interested in implementing cmdk-solid into solid-ui

sek-consulting commented 2 months ago

Thanks for info :)

I'll definitely will give it a try localy but since solid-ui is already built on top of 2 big dependencies (kobalte & corvu) I'm not sure if I want to introduce another one. But maybe I'll find a solution that works :)

sek-consulting commented 2 months ago

Update:

I think using cmdk-solid would be indeed a really cool addition to solid-ui. So if you have the capacities feel free to start a PR :) I'll merge it in once it's done.

create-signal commented 2 months ago

That's great! I'll spend some time on it this weekend