puck README

The project's README from github.com/puckeditor/puck. As one markdown file: README.md.




The visual editor for React

Documentation • Puck AI • Demo • Discord

⭐️ Enjoying Puck? Please leave a star!


GIF showing a page being created in the Puck Editor, with components being added, arranged, and customized in real time

What is Puck?

Puck is an open-source visual editor for React. Build drag-and-drop interfaces with your own components.

Embed Puck as a React component in your existing application. You own your components and data, with no vendor lock-in.

Puck's MIT license permits internal and commercial use.

Quick Start

1. Install the package

npm i @puckeditor/core --save

2. Render the editor

// Editor.jsx
import { Puck } from "@puckeditor/core";

// Create Puck component config
const config = {
  components: {
    HeadingBlock: {
      fields: {
        children: {
          type: "text",
        },
      },
      render: ({ children }) => {
        return <h1>{children}</h1>;
      },
    },
  },
};

// Describe the initial data
const initialData = {};

// Save pages to your backend (see step 4)
const save = (data) => {};

// Render Puck editor
export function Editor() {
  return <Puck config={config} data={initialData} onPublish={save} />;
}

3. Render the page

// Page.jsx
import { Render } from "@puckeditor/core";

export function Page() {
  return <Render config={config} data={data} />;
}

4. Choose a backend (optional)

Puck is designed to integrate into your existing backend. If you don't already have one or are building a new app, consider Puck Cloud.

Puck Cloud

Puck Cloud is our modular, hosted backend for Puck with a versioned page database, managed authentication, and much more. It's best for when you have no existing backend or database, and is free to start.

To configure it, run the Puck CLI, and select the modules you require:

npx @puckeditor/core init

Pages

Puck Pages is a hosted page store built for Puck, providing version history and data migrations.

npx @puckeditor/core add pages

Auth

Puck Auth provides managed authentication for Puck, allowing users to sign-in with a Puck Cloud account.

npx @puckeditor/core add auth

AI

Puck AI is an AI agent for Puck for generating interfaces directly from the editor.

npx @puckeditor/core add ai

Community

Get support

If you have any questions about Puck, please open a GitHub issue or join us on Discord.

License

MIT © The Puck Contributors

puck (puckeditor/puck)

Searching Database…

13.7K ·GitHub
What is this?Puck is a modular, open-source visual editor for React.js that lets you build custom drag-and-drop editing experiences using your own React components.
Is Puck a standalone app or something I embed in my own app?It is just a React component you render inside your own application, not a hosted SaaS or separate editor app — so it works in any React.js environment, including Next.js.
How do I add Puck to a React project?Install the Puck package, then render the editor component and render the resulting page content. For a faster start, use create-puck-app to scaffold a pre-configured app from a recipe.
Do I need Next.js or another specific framework to use it?No specific framework is required; Puck runs in any React setup. Ready-made recipes exist for Next.js (App Router, static generation) and React Router v7.
Who owns the content/data created with Puck?You own your data and there is no vendor lock-in, since Puck is just a library you run inside your own app rather than a hosted platform.
Does Puck have a plugin ecosystem?Yes — the community-run awesome-puck repo collects plugins, custom fields, and other extensions for Puck.
Can I get hands-on help beyond community support?Besides opening a GitHub issue or asking on Discord, you can book a discovery call directly with the maintainers for consultancy.
What's the fastest way to try Puck in a real app?Run create-puck-app to scaffold a ready project using one of the provided recipes, such as the Next.js App Router example or the React Router v7 example.
Where can I discuss Puck with other users?There is a dedicated Discord server for community discussion and support.
Creator
puckeditor
Size
9.7 MB
Stars
13.7K
Age
3y
Commits · 90 Days