Import component libary #6946
dat-nguyenquoc-tpv-clv
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, we're adding external component like this:
I suggest we could add a feature that we can simplify usage of external feature:
Let say we have
https://originui.com/r/.shadcn.json
Import library
The case of unique component names:
In case of component with same name:
Adding library
originui
pnpx shadcn@latest import https://originui.com/r --name originui # then we can add pnpx shadcn@latest add button --lib originui
Using prefix:
Using prefer:
Remove
pnpx shadcn@latest remove https://originui.com/r # install button from shadcn, because it become --prefer after previous prefered removed. pnpx shadcn@latest add button
Set prefer
Check config
Check component
Set prefer for one component
With this API, we can extends shadcn to use multiple flavor of UI.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions