0.19.1 • Published 5 months ago

@measured/puck v0.19.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

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 example, using App Router and static page generation
  • remix: Remix Run v2 example, using dynamic routes at root-level
  • react-router: React Router v7 app example, using dynamic routes to create pages at any level

Community

Get support

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.

License

MIT © The Puck Contributors

0.17.2

10 months ago

0.17.3

9 months ago

0.17.4

9 months ago

0.17.0

10 months ago

0.17.1

10 months ago

0.18.1

9 months ago

0.18.2

9 months ago

0.18.3

7 months ago

0.18.0

9 months ago

0.16.2

12 months ago

0.19.0

5 months ago

0.19.1

5 months ago

0.16.1

1 year ago

0.16.0

1 year ago

0.15.0

1 year ago

0.14.2

2 years ago

0.14.1

2 years ago

0.14.0

2 years ago

0.13.1

2 years ago

0.13.0

2 years ago

0.12.0

2 years ago

0.11.3

2 years ago

0.11.2

2 years ago

0.11.1

2 years ago

0.11.0

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.1-pr.3ea4aa0

2 years ago

0.7.0

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago