Skip to content

aayushi1995/puck

This branch is 6 commits ahead of, 417 commits behind measuredco/puck:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1ca78db · Aug 8, 2024
May 31, 2024
Aug 8, 2024
Jul 23, 2024
May 12, 2024
Mar 25, 2024
Dec 12, 2023
Sep 6, 2023
Jun 1, 2023
Sep 14, 2023
Sep 14, 2023
Jul 3, 2023
May 31, 2024
Oct 20, 2023
Oct 20, 2023
Dec 18, 2023
Apr 24, 2024
May 31, 2024
May 31, 2024
Dec 19, 2023
Jun 20, 2024

Repository files navigation

Puck

The visual editor for React.

Demo

Visit https://demo.puckeditor.com/edit to try the demo.

Documentation

Visit https://puckeditor.com to view the full documentation.

Quick start

Install the package:

npm i @measured/puck --save # or npx create-puck-app my-app

Render the editor:

// Editor.jsx
import { Puck } from "@measured/puck";
import "@measured/puck/puck.css";

// 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 "@measured/puck";
import "@measured/puck/puck.css";

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

Recipes

Use create-puck-app to quickly spin up a a pre-configured app based on our provided recipes:

npx create-puck-app my-app

Available recipes include:

  • next: Next.js 13 app example, using App Router and static page generation
  • remix: Remix Run v2 app example, using dynamic routes at root-level

Community

Hire the Puck team

Puck is developed and maintained by Measured, a small group of industry veterans with decades of experience helping companies solve hard UI problems. We offer consultancy and development services for scale-ups, SMEs and enterprises.

If you need support integrating Puck or creating a beautiful component library, please reach out via the Measured website.

License

MIT © Measured Corporation Ltd

About

Enhancement to the puck editor demo link

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 59.6%
  • MDX 28.1%
  • CSS 10.2%
  • JavaScript 1.8%
  • Other 0.3%