21st.dev is your go-to open-source community registry for React UI components! Whether you're a developer, designer, or just someone who loves building beautiful interfaces, 21st.dev is the place to publish, discover, and install minimal, modern, and reusable React components powered by Tailwind CSS and Radix UI.
Inspired by the amazing shadcn/ui, we're here to make building UIs faster, easier, and more fun. 🎉
We're building more than just a component registry – we're building a community of developers who love creating beautiful UIs. Here's how you can get involved:
npx shadcn command.Yes, you read that right—1 minute! 🕒
Publishing your React component is as easy as pie. Just head over to our publish page and share your creation with the world.
When you publish a component, it follows this journey:
on_review) - Component is available via direct link and awaiting reviewposted) - Component has passed review and is available on your profile and via direct linkfeatured) - Component is featured on the homepage and in public listingsI (Serafim) personally review each component to ensure it meets our quality standards before featuring it.
To get your component featured, ensure it follows these key principles:
Visual Quality
Component should be visually polished and provide real value to the community
Follow modern UI/UX practices
Code Structure
Follow the shadcn/ui pattern of separating component logic from demo content
Demo file should showcase the component through props, not hardcoded content
Theming
globals.css)hsl(var(--background)))Remember: Quality over quantity! We prioritize well-crafted, reusable components that follow these guidelines.
your-component/ # How to organize your files
├── code.tsx # Main component
├── tailwind.config.js # Optional Tailwind config
├── globals.css # Optional global styles
└── demos/ # Each component can have multiple demos
├── default/ # Primary demo (required)
│ ├── code.demo.tsx # Demo implementation
│ ├── preview.png # Static preview image
│ └── video.mp4 # Optional demo video
└── advanced/ # Additional demos (optional)
├── code.demo.tsx
├── preview.png
└── video.mp4
# Files are stored in Cloudflare R2 under:
# components-code/{user_id}/{component_slug}/...
Pro Tip: We encourage TypeScript components. JavaScript is cool too, but untested for now. 😉
Found a component you love on 21st.dev? Installing it is a breeze. Just copy the npx shadcn command and run it in your project's root folder.
For example, to install the shadcn/ui/accordion component, run:
npx shadcn@latest add "https://21st.dev/r/shadcn/accordion"
This command will:
Why use the command?
While you can copy-paste code directly from the website, using npx shadcn ensures you get all the files and dependencies without missing a beat. It's the recommended way to go! 🚀
The project uses a modern stack:
We're thrilled you want to contribute! Whether you're a seasoned developer or just starting out, there's a place for you here. Let's get you set up:
Before diving in, make sure you have:
Fork & Clone: Fork the repository and clone it locally. We recommend using Cursor if you're non-technical.
Install Dependencies: We're big fans of pnpm! Run:
bash
pnpm install
.env.local in apps/web with:``` # Supabase NEXT_PUBLIC_SUPABASE_URL=https://* NEXT_PUBLIC_SUPABASE_KEY= SUPABASE_SERVICE_ROLE_KEY=**
# Clerk NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=* CLERK_SECRET_KEY= CLERK_WEBHOOK_SECRET=**
# Cloudflare R2 NEXT_PUBLIC_CDN_URL=https://* R2_ACCESS_KEY_ID= R2_SECRET_ACCESS_KEY= NEXT_PUBLIC_R2_ENDPOINT=https://***
# Other NEXT_PUBLIC_APP_URL=https://21st.dev NEXT_PUBLIC_AMPLITUDE_API_KEY=* ```
bash
pnpm dev
main branch. We can't wait to see what you've built! 🎉The project was developed by @serafimcloud, with significant contributions from @daniel_dhawan and @garrrikkotua.
This project wouldn't be possible without the incredible work of:
And, of course, YOU—our amazing open-source contributors! ❤️
Ready to dive in? Start exploring, publishing, and contributing today. Let's make 21st.dev the best place for React UI components on the web. Happy coding! 🎉
We maintain high quality standards for components that appear on the homepage and in public listings. While all published components are immediately available via direct links, they go through a review process before being featured publicly.
When you publish a component, it follows this journey:
on_review) - Component is available via direct link and awaiting reviewposted) - Component has passed review and is available on your profile and via direct linkfeatured) - Component is featured on the homepage and in public listingsI (Serafim) personally review each component to ensure it meets our quality standards before featuring it. This helps maintain a high-quality collection of components that truly benefit the community.
To ensure your component gets featured, follow these guidelines:
Visual Design
Component should be visually polished and provide value to the community
Use consistent spacing and sizing
Code Structure
Follow the shadcn/ui pattern of separating component logic from demo content
Use props for customization and content injection
Theming
Use CSS variables from shadcn's theme system (see globals.css)
hsl variables for colors (e.g., hsl(var(--background)))Follow the naming convention for CSS variables
Accessibility
Include proper ARIA attributes
Test with screen readers
Documentation
Provide clear prop documentation
Add helpful comments for complex logic
Best Practices
Remember: Quality over quantity! We'd rather have fewer, well-crafted components than many that don't meet our standards.
21st Labs Inc.