A composable UI builder component. Design beautiful block-based layouts visually — then export HTML with one function call.
A full-featured UI block builder in a single React component.
Install from npm, drop the component in, and start building.
import { EmailBlockEditor, renderEmailDocument, createEmptyDocument } from 'block-based';
import { useState } from 'react';
export function App() {
const [doc, setDoc] = useState(createEmptyDocument);
return (
<>
<EmailBlockEditor value={doc} onChange={setDoc} height="600px" />
<button onClick={() => console.log(renderEmailDocument(doc))}>
Export HTML
</button>
</>
);
}Read the docs