Skip to content

silicondeck/shadcn-cheatsheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‹ shadcn/ui Cheatsheet

MIT License GitHub Stars TypeScript React Next.js``` Tailwind CSS shadcn/ui

Interactive Cheatsheet for shadcn/ui components with live previews, copy-paste ready code examples, and comprehensive documentation for 45 components.

πŸš€ Free & Open Source by ShadcnStore - Your gateway to premium UI components, dashboards, and templates.

🎯 View Live Demo | 🧩 Explore Premium Blocks | πŸ–₯️ Get Dashboard Template


✨ What's This?

The shadcn/ui Cheatsheet is the most comprehensive, interactive reference guide for shadcn/ui components available. Built by developers, for developers, it provides instant access to live component previews, copy-paste ready code snippets, and complete documentation for every shadcn/ui component.

Whether you're just getting started with shadcn/ui or you're a seasoned developer looking for quick reference, this Cheatsheet accelerates your development workflow and helps you build beautiful, accessible interfaces faster.


οΏ½ Live Demo

Experience the Cheatsheet in action:

Note: Every component includes live previews, usage examples, installation commands, and copy-paste ready code snippets.


✨ Key Features

πŸ”₯ Complete Component Library

  • 45 Components - Every shadcn/ui component covered
  • Live Previews - Interactive component demonstrations
  • Multiple Variants - All component variations and examples
  • Real-time Updates - Always up-to-date with latest shadcn/ui releases

πŸ“‹ Developer-Focused Tools

  • Copy-Paste Ready - One-click code copying for components and examples
  • Installation Commands - Package manager specific install commands (npm, pnpm, yarn, bun)
  • Import Statements - Ready-to-use import statements
  • Usage Examples - Practical implementation examples

🎨 Advanced Features

  • Theme Customizer - Real-time theme switching and preview
  • Smart Search - Find components instantly with fuzzy search
  • Category Filtering - Browse by component categories
  • Keyboard Navigation - Full keyboard accessibility
  • URL Bookmarking - Direct links to specific components

⚑ Performance & UX

  • Lightning Fast - Built with Next.js 15 & Turbopack
  • Responsive Design - Mobile-first approach
  • Dark/Light Mode - Beautiful theme switching
  • Smooth Animations - Polished user experience
  • Scroll Position Memory - Maintains scroll position during navigation

οΏ½ Quick Start

Prerequisites

  • Node.js 18+
  • pnpm (recommended), npm, yarn, or bun

1. Clone & Install

# Clone the repository
git clone https://github.com/silicondeck/shadcn-cheatsheet.git
cd shadcn-cheatsheet

# Install dependencies
pnpm install

# Start development server
pnpm dev

2. Access the Application

Open http://localhost:3000 in your browser, or visit the live demo at https://shadcnstore.com/cheatsheet.

3. Build for Production

# Build for production
pnpm build

# Start production server
pnpm start

πŸ“¦ Available Components

Key Components Included

  • βœ… Button - Buttons with multiple variants and sizes
  • βœ… Input - Text inputs with validation states
  • βœ… Select - Dropdown select components
  • βœ… Dialog - Modal dialogs
  • βœ… Sheet - Side panels and drawers
  • βœ… Table - Advanced data tables
  • βœ… Card - Content cards with headers and footers
  • βœ… Navigation Menu - Complex navigation with dropdowns
  • βœ… Calendar - Date picker calendars
  • βœ… Accordion - Collapsible content sections
  • βœ… Sonner Toast - Notification toasts

And 34+ more components covering all shadcn/ui functionality!


πŸ› οΈ Development Commands

# Start development server with hot reload
pnpm dev

# Build for production
pnpm build

# Start production server
pnpm start

# Run linting
pnpm lint

# Run linting with auto-fix
pnpm lint --fix

# Type checking
pnpm type-check

πŸ“ Project Structure

πŸ“ shadcn-cheatsheet/
β”œβ”€β”€ πŸ“ app/                      # Next.js App Router
β”‚   β”œβ”€β”€ πŸ“„ layout.tsx           # Root layout
β”‚   β”œβ”€β”€ πŸ“„ page.tsx             # Homepage
β”‚   β”œβ”€β”€ πŸ“„ globals.css          # Global styles
β”‚   └── πŸ“ api/                 # API routes
β”‚       └── πŸ“ registry/        # Component registry API
β”œβ”€β”€ πŸ“ components/              # React components
β”‚   β”œβ”€β”€ πŸ“ ui/                  # shadcn/ui components
β”‚   β”œβ”€β”€ πŸ“ layout/              # Layout components
β”‚   β”œβ”€β”€ πŸ“ cards/               # Component preview cards
β”‚   β”œβ”€β”€ πŸ“ search/              # Search functionality
β”‚   └── πŸ“ theme-customizer/    # Theme customization
β”œβ”€β”€ πŸ“ lib/                     # Utility libraries
β”‚   β”œβ”€β”€ πŸ“„ search.ts            # Fuzzy search logic
β”‚   β”œβ”€β”€ πŸ“„ registry.ts          # Component registry
β”‚   └── πŸ“„ utils.ts             # Utility functions
β”œβ”€β”€ πŸ“ data/                    # Static data
β”‚   └── πŸ“„ components-simple.ts # Component definitions
β”œβ”€β”€ πŸ“ registry/                # Component examples
β”‚   └── πŸ“ default/
β”‚       └── πŸ“ examples/        # Component example files
β”œβ”€β”€ πŸ“ hooks/                   # Custom React hooks
β”œβ”€β”€ πŸ“ types/                   # TypeScript definitions
└── πŸ“ public/                  # Static assets

πŸ› οΈ Tech Stack

Core Framework

UI & Styling


οΏ½ Usage & Navigation

Component Cards

Each component card displays:

  • Component name and description
  • Installation command for selected package manager
  • Code variants with individual copy buttons
  • Dependencies and documentation links
  • Expand/collapse for detailed view

Package Manager Integration

Switch between package managers using the tab interface:

# npm, # yarn, # pnpm, # bun

Search & Navigation

  • Global Search - Press Ctrl+K or CMD+k to open command palette
  • Category Filters - Click category badges to filter components
  • Component Preview - Click any component for live preview
  • Keyboard Navigation - Use arrow keys in preview mode
  • Theme Customizer - Real-time theme switching and customization

🌟 Why Use This Cheatsheet?

πŸš€ Speed Up Development

  • Instant Reference - No more digging through documentation
  • Copy-Paste Ready - Get code snippets immediately
  • Live Previews - See exactly how components look and behave
  • Complete Examples - Real-world usage patterns

πŸ“š Comprehensive Coverage

  • Every Component - Complete shadcn/ui library coverage
  • All Variants - Every possible component variation
  • Up-to-Date - Always current with latest releases
  • Best Practices - Proper usage examples and patterns

🎯 Developer-Focused

  • Keyboard Navigation - Full accessibility support
  • Search Everything - Find any component instantly
  • Mobile Ready - Works perfectly on all devices
  • Performance Optimized - Fast loading and smooth interactions

πŸš€ Take It Further with ShadcnStore

This free Cheatsheet is part of the ShadcnStore ecosystem! Discover more resources to accelerate your development:

🎁 Available Now

Complete admin dashboard with 30+ pages, built with shadcn/ui:

  • 2 Dashboard Variants - Overview & Analytics dashboards
  • App Demos - Mail, Tasks, Chat, Calendar applications
  • Authentication Pages - Login, signup, password recovery
  • Settings Pages - Account, billing, appearance management
  • Live Theme Customizer - Real-time theme editing with tweakcn
  • Available in Vite & Next.js - Choose your preferred framework

150+ production-ready UI blocks for rapid development:

  • Application Blocks - Dashboard components and layouts
  • Marketing Blocks - Landing page sections and CTAs
  • E-commerce Blocks - Shopping cart, product cards, checkout flows
  • Free Blocks - No-cost starter components
  • Copy-Paste Ready - Drop into any shadcn/ui project

πŸ”œ Coming Soon

  • Landing Page Collection - Business-ready marketing templates
  • E-commerce Templates - Complete online store solutions
  • SaaS Starter Kits - Full-stack application templates

πŸ’‘ Perfect For

  • SaaS Applications - Complete dashboard and admin solutions
  • Marketing Websites - Beautiful, conversion-optimized landing pages
  • E-commerce Sites - Professional online store interfaces
  • Internal Tools - Admin panels and business applications

🎯 Explore ShadcnStore - Premium blocks, dashboards and templates for modern web applications.


🀝 Contributing

We welcome contributions from the community! Here's how you can help make this Cheatsheet even better:

Ways to Contribute

  • πŸ› Report Bugs - Found an issue? Create an issue
  • πŸ’‘ Suggest Features - Have ideas for improvements? We'd love to hear them!
  • πŸ”§ Submit Pull Requests - Fix bugs, add features, or improve documentation
  • ⭐ Star the Repository - Show your support and help others discover this project!

Getting Started

  1. Fork the repository - Click the fork button at the top of this page
  2. Clone your fork - git clone https://github.com/yourusername/shadcn-cheatsheet.git
  3. Create a feature branch - git checkout -b feature/amazing-feature
  4. Make your changes - Add your improvements
  5. Test thoroughly - Ensure everything works correctly
  6. Commit your changes - git commit -m 'Add amazing feature'
  7. Push to your branch - git push origin feature/amazing-feature
  8. Open a Pull Request - Submit your changes for review

Development Guidelines

  • Use TypeScript for all new code
  • Follow the existing code style and formatting
  • Add type definitions for new components or props
  • Test your changes across different screen sizes
  • Write clear, descriptive commit messages
  • Update documentation for new features

Component Guidelines

When adding new components:

  • Follow the existing component structure in data/components-simple.ts
  • Create example files in registry/default/examples/
  • Include multiple variants where applicable
  • Add proper TypeScript types
  • Test accessibility and keyboard navigation

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

You are free to:

  • βœ… Use for personal and commercial projects
  • βœ… Modify and distribute the code
  • βœ… Include in your own projects
  • βœ… Create derivative works

Attribution to ShadcnStore is appreciated but not required.


πŸ™ Credits & Acknowledgments

This Cheatsheet is built on the foundation of incredible open-source projects and the amazing work of their maintainers:

  • shadcn - For creating the amazing shadcn/ui component library
  • shadcn/ui - Beautiful and accessible React components
  • Radix UI - Low-level accessible UI primitives
  • Tailwind CSS - Utility-first CSS framework
  • Next.js - The React framework for production
  • Vercel - Platform for frontend frameworks and static sites
  • Lucide - Beautiful & consistent icon library

πŸ“ž Support & Community

Get Help

Stay Connected

Found This Helpful?

  • ⭐ Star this repository to show your support
  • πŸ”„ Share with your team and fellow developers
  • 🐦 Tweet about it to help others discover this resource
  • ❀️ Sponsor the project to help us maintain and improve it

⭐ Star this repo if it helped you

Every star helps more developers discover this resource

Star History Chart

ShadcnStore

A free & open-source project by ShadcnStore - Premium UI components, dashboards and templates for modern web development.

Made with ❀️ for the React and shadcn/ui community