The visual editor for React.
Puck is a modular, open-source visual editor for React.js. You can use Puck to build custom drag-and-drop experiences with your own application and React components.
Because Puck is just a React component, it plays well with all React.js environments, including Next.js. You own your data and there’s no vendor lock-in.
Puck is also licensed under MIT, making it suitable for both internal systems and commercial applications.
Install the package:
npm i @puckeditor/core --save # or npx create-puck-app my-appRender 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 the data to your database
const save = (data) => {};
// Render Puck editor
export function Editor() {
return <Puck config={config} data={initialData} onPublish={save} />;
}Render the page:
// Page.jsx
import { Render } from "@puckeditor/core";
export function Page() {
return <Render config={config} data={data} />;
}Use create-puck-app to quickly spin up a a pre-configured app based on our provided recipes:
npx create-puck-app my-appAvailable recipes include:
If you have any questions about Puck, please open a GitHub issue or join us on Discord.
Or book a discovery call for hands-on support and consultancy.
MIT © The Puck Contributors
Add fieldsets and tabs to fields API
Backspace and Delete do not edit text inputs in interactive mode
0.23: canvas per-item overlay (Duplicate/Delete, overrides.actionBar) never mounts, though selection state updates correctly
0.21.0: sidebar text field renders its <input> twice with the same id (duplicate DOM ids, breaks label association)
Dropping a Drawer item into a nested slot inserts into the parent zone while the pointer moves (onDragOver cancels the area-change debounce)
AutoField unconditionally overrides custom id prop instead of falling back like AutoFieldInternal
Support CSS positioning for draggable components
Support partial slot overrides for array field UI
Allow multiple array items open simultaneously
Support setting permissions programmatically