@sashakil12/shadcn-components
v0.1.0
Published
Custom shadcn/ui component library
Maintainers
Readme
@yourusername/shadcn-components
A custom component library built with shadcn/ui that can be installed via the shadcn CLI.
Components
- FancyCard: A card component with gradient options and hover effects
Installation
For Developers Contributing to This Library
- Clone this repository
- Install dependencies:
npm install - Build the registry:
npm run build:registry
For Users of This Library
- Make sure you have a shadcn/ui project set up with a
components.jsonfile - Add this registry to your
components.json:{ "style": "default", "tailwind": { "config": "tailwind.config.ts", "css": "app/globals.css", "baseColor": "slate", "cssVariables": true }, "aliases": { "components": "@/components", "utils": "@/lib/utils" }, "registries": [ { "name": "@yourusername/shadcn-components", "url": "npm:@yourusername/shadcn-components" } ] } - Install components using the shadcn CLI:
npx shadcn@latest add fancy-card
Adding New Components
- Create your component in
src/components/ui/ - Add metadata to the component using JSDoc comments:
/** * @shadcn-metadata * { * "title": "Component Title", * "description": "Component description", * "dependencies": ["dependency1", "dependency2"], * "registryDependencies": ["button", "other-shadcn-component"] * } */ - Add the component name to
registry/index.ts - Build the registry:
npm run build:registry
Publishing
- Update the version in
package.json - Build the library:
npm run build - Publish to npm:
npm publish
Development
- Run
npm run devto watch for changes in TypeScript files - Run
npm run build:registryto rebuild the registry files
License
MIT
