Preblocks Documentation
Learn how to install Preblocks, configure the shadcn CLI registry namespace, and MCP.Add Registry
You can add Preblocks as a registry namespace in your components.json file located in your project’s root directory.
{
"registries": {
"@preblocks": "https://preblocks.com/r/{name}.json"
}
}Learn more about registry namespaces in the shadcn documentation.
Installation
Once the registry is added, you can install any block or component provided by Preblocks using the shadcn CLI.
pnpm dlx shadcn add @preblocks/cta-1npx shadcn add @preblocks/cta-1This command will install the first Call to Action block. You can find the CLI command to copy for each block in its top-right corner.
MCP Server
You can configure the MCP server using the shadcn CLI’s built-in functionality.
pnpm dlx shadcn mcp initIf you have any questions or find any issues with any component, please open an issue on GitHub, you can also send an email.