Add a block to this project and get your contribution recognized.
We are inviting the community to share your components and blocks with other developers and help build a library of high-quality, reusable components.
We aim to build a collection of ready-to-use, beautifully animated, and well-styled components that developers can copy-paste seamlessly into their projects. Your contributions help make this project even better!
A block can be a single component (eg. a variation of a ui component) or a complex component (eg. a dashboard) with multiple components, hooks, and utils.
If you are creating a new block of a new category, create a new folder in components/mvpblocks with the name of your category. For example, mainsections.
If you are creating a new block in an existing category, create a new folder in components/mvpblocks/[category] with the name of your block. For example, hero-1.
Note: The build script will take care of building the block for the default style.
To add your block to the registry, you need to add your block definition to registry-blocks.ts.
registry/registry-blocks.tsx
export const blocks = [ // ... { name: "hero-1", author: "subhadeeproy3902", // Your GitHub username type: "registry:block", dependencies: ["lucide-react"], // List of dependencies to install registryDependencies: [`${siteLink}/r/header.json`], // List of registry dependencies to make your block work files: [ { path: "@/components/mvpblocks/mainsections/hero-1.tsx", // Path to your block file type: "registry:block", }, ], component: React.lazy( () => import("../components/mvpblocks/mainsections/hero-1"), // Lazy path to your block component ), }];
Note: If you are using ui or hooks or utils/lib, make sure to add them in registry-ui.ts or registry-hooks.ts or registry-lib.ts respectively. Main block path should be @/components/mvpblocks/[category]/[block].tsx.
Make sure you add a name, description, type, registryDependencies, dependencies, files correctly.
Once the build script is finished, you can view your block at http://localhost:3000/docs/[blockpath] or a full screen preview at http://localhost:3000/preview/[blockname].
Capture a screenshot of your block in action. You can use any screenshot tool you prefer.
You can use the built-in screenshot tool in your operating system or a third-party tool like Snagit or Greenshot.
Here are some guidelines to follow when contributing to the blocks library.
The following properties are required for the block definition: name, description, type, files.
Make sure to list all registry dependencies in registryDependencies. A registry dependency is the path of the component in the registry eg. https://blocks.mvp-subha.me/r/globe.json.
Make sure to list all dependencies in dependencies. A dependency is the name of the package in the registry eg. zod, sonner, etc.