react-ast
craft.js
react-ast | craft.js | |
---|---|---|
1 | 18 | |
312 | 7,070 | |
- | - | |
8.9 | 7.4 | |
4 months ago | about 1 month ago | |
TypeScript | TypeScript | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
react-ast
-
Utopia, a visual design tool for React, with code as the source of truth
I was planning on building something similar. My first attempt involved trying to get grapesjs to work with react. This attempt was very cumbersome because grapesjs generated html, and I would try to manipulate the html into react.
https://github.com/artf/grapesjs
Later however, I discovered craft.js, which is basically a framework for creating systems similar to this (page/component editors). Craft.js was inspired by grapesjs, but is specifically made for react.
https://github.com/prevwong/craft.js
Of course craft.js only solves the UI editor, not the code parsing/generation part. Babel is an obvious choice for code generation/manipulation, but I found its imperative approach unnecessarily complicated, so I built react-ast to enable declarative and composable code generation using react.
https://github.com/clayrisser/react-ast
The part I had not figured out was using the code as the source of truth for the editor and syncing it back. I definitely thought about it a lot, but postponed solving it since I had more pressing problems.
So, I have a lot of curiosity about this project. How does it work? And how does it stack up against a technology like craft.js? I noticed it’s not using craft.js, so I’m guessing the developers rolled their own equivalent.
craft.js
- Craft.js – A React Framework for building extensible drag and drop page editors
-
How to build a webpage builder like Wix, Squarespace, Shopify, etc? I want to build one with React
I've been building one with https://craft.js.org/ , tailwind, nextjs, and vercel, a few months into it I've got a decent component library, custom domains, subdomains, static pages, accounts, multiple pages, cdn and a bit more. The basics are easy to get going. Making it easy to understand/use, responsive, and all that, is a bit more complex.
-
Reka.js - Build your own no-code editor ✨
As for the second part of your question, regarding UI. Reka is purely the state management system, so it is designed to help with storing/editing user content and computing an output for that content so you can render that on the browser; it’s not really responsible for the UI part. For building UI’s for your page editor - there’s Craft.js which is another framework that I built for creating page editors. Craft comes with an event system that lets you know which elements is being selected/hovered/dragged and a drag and drop system that lets you move elements around on the screen along with other things that helps you build your own page editor UI. Craft is actually the parent project of Reka. Reka was built to replace Craft’s internal state management system so that you could build entire UI components in Craft in the future. If you’re interested, you could check out the motivation and relationship between Craft and Reka here. As for the demo shown in the video, all the UI interactions (including some that you have mentioned like showing the borders of selected elements) are fairly straightforward, and they’re simply just interacting/mutating the AST state of Reka. Feel free to take a look at the code for the demo.
-
Where to start building a low-code tool
https://craft.js.org/ - This is probably more like what you're looking for. It's in heavy development still and does lack some features but you can use it with reactive components.
-
WYSIWYG/Drag-And-Drop alternative to GrapeJS in react
We’ve been looking into craftjs for this use case since it seems to be more targeted at letting you build on top of it. https://craft.js.org/
-
How to build your own Figma like view, with drag and drop
Does anyone have some recommendations? https://craft.js.org/ something like this, but not with HTML.
- I'm making a No-code website builder, using React. Need Advice on architecture and implementation of my idea.
-
How would you create multiple custom templates using HTML/CSS like Canva?
i think that's how all no-code web editors like carrd, webflow, squarespace work i think (see https://github.com/prevwong/craft.js & https://github.com/artf/grapesjs)
-
[AskJS] Resources for Building a No-Code Editor
If you're just talking about a WYSIWYG website page editor, check out https://github.com/prevwong/craft.js
- How would I approach building a landing-page builder?