solancn
v0.0.13
Published
Add Solana UI components to your apps with shadcn-based configuration
Maintainers
Readme
Solancn CLI
A CLI for adding Solancn ui components to your project. Superset of shadcn.
Usage
Use the init command to initialize dependencies for a new project.
The init command installs dependencies (framer-motion), adds the cn util, configures tailwind.config.js, and CSS variables for the project.
npx solancn initshadcn project
If your project is already using the shadcn, don't worry! You can still use solancn.
npx shadcn initJust add these two lines to your components.json file:
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "app/globals.css",
"baseColor": "slate",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
+ "ui": "@/components/ui",
+ "solancn": "@/components/solancn"
}
}add
Use the add command to add components to your project.
The add command adds a component to your project and installs all required dependencies.
npx solancn add [component]Example
npx solancn add bento-gridYou can also use the optional --all flag to install all components:
npx solancn add --allYou can also use the --components flag to select and install components you saw on website:
npx solancn add --componentsYou can also use the --templates flag to select and install templates you saw on website:
npx solancn add --templatesYou can also run the command without any arguments to view a list of all available components:
npx solancn addshadcn
You can also use the same CLI for selecting & installing shadcn components:
npx solancn add --shadcn buttonnpx solancn add --shadcn --allDocumentation
Visit https://ui.solancn.com/docs/installation to view the documentation.
License
Licensed under the MIT license.
