A modern, comprehensive React component library that extends Shadcn UI with powerful features and enhancements.
- 🎨 40+ High-quality Components - Production-ready React components
- 🪝 Custom React Hooks - Utility hooks for common patterns
- ✨ Beautiful Animations - Pre-built animation components and utilities
- 🎭 Tailwind CSS - Utility-first styling with full customization
- 📦 Tree-shakeable - Import only what you need
- 🌙 Dark Mode Support - Built-in theme switching
- 📱 Responsive - Mobile-first design approach
- ♿ Accessible - ARIA compliant components
- 🔧 TypeScript - Full type safety
- 📖 Well-documented - Comprehensive examples and API docs
- 📖 Storybook - Interactive component documentation
- 📦 NPM Package - Latest package on npm
Add this design system skill to your AI Agent so it can automatically recognize components, props, and usage patterns:
npx skills add https://github.com/sonth87/design-system/tree/main/skills/shadcn-design-system --skill shadcn-design-systemOnce added, the AI Agent can:
- Know exactly how to import and use each component
- Generate code with correct props, types, and examples
- Understand design tokens, hooks, and utilities in this design system
See full reference at docs/SKILL.md
npm install @sth87/shadcn-design-systempnpm add @sth87/shadcn-design-systemyarn add @sth87/shadcn-design-systemMake sure you have the following peer dependencies installed:
npm install react react-dom tailwindcssImport the CSS in your main application file (e.g., main.tsx or App.tsx):
import "@sth87/shadcn-design-system/index.css";// animation
import "@sth87/shadcn-design-system/animation.css";import { Button, Input } from "@sth87/shadcn-design-system";
function App() {
return (
<div className="p-6 max-w-md">
<h1 className="text-2xl font-bold mb-4">Welcome</h1>
<Input placeholder="Enter your email" className="mb-4" />
<Button variant="default" className="w-full">
Get Started
</Button>
</div>
);
}import { useDebounce } from "@sth87/shadcn-design-system";
import { useState, useEffect } from "react";
function SearchComponent() {
const [search, setSearch] = useState("");
const debouncedSearch = useDebounce(search, 500);
useEffect(() => {
// API call with debounced value
if (debouncedSearch) {
console.log("Searching for:", debouncedSearch);
}
}, [debouncedSearch]);
return <Input value={search} onChange={(e) => setSearch(e.target.value)} />;
}Layout & Structure
- Card
- Separator
- ScrollArea
- Resizable
- Glass
- Sidebar
Form Controls
- Input
- Textarea
- Checkbox
- Radio
- Switch
- Select
- DatePicker
- TimePicker
- RangePicker
- Upload
- InputOTP
Navigation
- Breadcrumb
- Tabs
- Pagination
- Stepper
- Command
Feedback & Overlays
- Toast
- Dialog
- Sheet
- Popover
- Tooltip
- Alert
Data Display
- Table
- Badge
- Avatar
- Carousel
- ImageViewer
- QrCode
- Rate
- Skeleton
Animations
- Marquee
- TextAnimations
- Interactive Components
Advanced Components
- TreeSelect
- Tour
- Cropper
- ContextMenu
- DropdownMenu
- Masonry
useDebounce/useDebouncedCallback- Debounce values and callbacksuseIntersectionObserver- Detect element visibilityuseMediaQuery- Responsive breakpoint detectionuseMousePosition- Track mouse coordinatesuseOnClickOutside- Detect clicks outside elementuseScrollLock- Lock/unlock body scrolluseEventListener- Simplified event handlinguseCallbackRef- Stable callback references- And more...
All components support the className prop for custom styling with Tailwind CSS:
<Button
variant="outline"
size="lg"
className="bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600"
>
Custom Gradient Button
</Button>Override CSS variables for global theming:
:root {
--background: #ffffff;
--foreground: #2e3a5b;
--muted-foreground: #58617c;
--subtle-foreground: #777f94;
--card: #ffffff;
--card-foreground: #0a0a0a;
--popover: #ffffff;
--popover-foreground: #0a0a0a;
--primary: #f37320;
--primary-foreground: #fafafa;
--secondary: #213f99;
--secondary-foreground: #fafafa;
--muted: #f5f5f5;
/* --muted-foreground: #737373; */
--accent: #f5f5f5;
--accent-foreground: #171717;
--destructive: #e7000b;
--destructive-foreground: #fafafa;
/* state color */
--success: #39cc7e;
--success-foreground: #ffffff;
--error: #ff6262;
--error-foreground: #ffffff;
--warning: #ff9d57;
--warning-foreground: #ffffff;
/* end state color */
--border: #e5e5e5;
--input: #e5e5e5;
--ring: #a1a1a1;
--chart-1: #f54a00;
--chart-2: #009689;
--chart-3: #104e64;
--chart-4: #ffba00;
--chart-5: #fd9a00;
--radius: 0.625rem;
--sidebar: #f1f5f9;
--sidebar-foreground: #2e3a5b;
--sidebar-primary: #171717;
--sidebar-primary-foreground: #fafafa;
--sidebar-accent: #f5f5f5;
--sidebar-accent-foreground: #171717;
--sidebar-border: #e5e5e5;
--sidebar-ring: #a1a1a1;
}
.dark {
--background: #303841;
--foreground: #94a0ad;
--muted-foreground: #eaebef;
--subtle-foreground: #f5f5f7;
--card: #36404a;
--card-foreground: #94a0ad;
--popover: #0a0a0a;
--popover-foreground: #fafafa;
--primary: #f37320;
--primary-foreground: #fafafa;
--secondary: #213f99;
--secondary-foreground: #fafafa;
--muted: #36404a;
/* --muted-foreground: #a1a1a1; */
--accent: #262626;
--accent-foreground: #fafafa;
--destructive: #82181a;
--destructive-foreground: #fb2c36;
/* state color */
--success: #39cc7e;
--success-foreground: #ffffff;
--error: #ff6262;
--error-foreground: #ffffff;
--warning: #ff9d57;
--warning-foreground: #ffffff;
/* end state color */
--border: #262626;
--input: #262626;
--ring: #737373;
--chart-1: #1447e6;
--chart-2: #00bc7d;
--chart-3: #fd9a00;
--chart-4: #ad46ff;
--chart-5: #ff2056;
--sidebar: #37424c;
--sidebar-foreground: #94a0ad;
--sidebar-primary: #1447e6;
--sidebar-primary-foreground: #fafafa;
--sidebar-accent: #262626;
--sidebar-accent-foreground: #fafafa;
--sidebar-border: #262626;
--sidebar-ring: #525252;
}This is a monorepo managed with pnpm workspaces and Turborepo.
- Node.js 18+
- pnpm 8+
pnpm installpnpm devpnpm buildpnpm storybookContributions are welcome! Please feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
- Improve documentation
MIT License - see the LICENSE file for details.
This project is built on top of:
- Shadcn UI - Original component library
- Radix UI - Headless UI components
- Tailwind CSS - Utility-first CSS framework
- React - UI library