Make all components copy/paste with npx like shadcn/ui #2040
Replies: 3 comments 5 replies
-
What would those commands do exactly? We don't have the most reliable analytics, but it seems like most of our users prefer the CDN + autoloader. However, our npm users currently do import '@shoelace-style/shoelace/dist/components/button/button.js'; A CLI interface adds more complexity for us to build/maintain and I'm struggling to see what problem it solves. |
Beta Was this translation helpful? Give feedback.
-
In my opinion, ShadCN is a fundamentally different library. ShadCN has a CLI because its a "component generator" whereas Shoelace is a "component library". The difference is that ShadCN scaffolds your components for you and isn't directly importable. Shoelace however has directly importable modules and there's nothing for you to scaffold on your own. By adding a CLI, it makes flexibility harder because it would need to write those import statements to the top of your entrypoint, we dont know where your entrypoint lives, so then we would need a Adding an import statement to the top of your entrypoint seems to be the same amount of work as running an |
Beta Was this translation helpful? Give feedback.
-
If I may add to this conversation, this is what actually drew our attention to Shoelace (vs shadn or Flowbite). That the components are not copy paste code but rather encapsulated components (structure, purpose, events...) and that they are built once (using Lit) which ensures consistency across frameworks e.g. Vue version does not have missing elements that are only available in React or items that look different in e.g. Java vs React vs Angular (which was the case in PrimeFaces). |
Beta Was this translation helpful? Give feedback.
-
Crazy idea incoming.
Why not simplify installation and potentially performance by just having the components being able to down load through an npx scrip like https://ui.shadcn.com does.
For example:
npx shadcn-ui@latest add carousel
would be something like
npx shoelace@latest add carousel
This can potentially give support for all frameworks and meta framework.
I would like to start the discussion.
Beta Was this translation helpful? Give feedback.
All reactions