You can publish React components to the 21st.dev registry by visiting the publish page. Components follow a specific lifecycle:
on_review: Initial state; available via direct link but awaiting review.posted: Passed review; available on your profile and via direct link.featured: Featured on the homepage and public listings.
Required File Structure
To ensure compatibility, organize your component files as follows:
your-component/ # Root directory
├── code.tsx # Main reusable component logic
├── tailwind.config.js # (Optional) Tailwind configuration
├── globals.css # (Optional) Global styles
└── demos/ # Directory for component variations
├── 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
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