Use the Fraczled SDK to embed a full design studio inside your app. You control the container, licensing, and data flow. The editor handles the heavy lifting.
The editor fills its container. Give it a height or the UI will be blank.
Install the SDK with npm and mount the editor in any HTML element. Make sure you have React and React DOM installed in your project.
npm install @fraczled/sdk
import { createFraczledEditor } from "@fraczled/sdk";
const editor = createFraczledEditor({
apiKey: "dev_your_key",
projectId: "proj_123",
container: document.getElementById("fraczled-editor")
});
editor.on("change", (state) => {
console.log("Design updated", state);
});
const json = editor.save();
editor.destroy();
Prefer a no-bundler setup? Host the UMD file and use the global FraczledSDK object.
<div id="fraczled-editor" style="height: 100vh"></div>
<script src="https://your-cdn.com/fraczled-sdk.umd.js"></script>
<script>
FraczledSDK.createFraczledEditor({
container: document.getElementById("fraczled-editor"),
apiKey: "dev_your_key",
projectId: "proj_123"
});
</script>
These are the most common options used by website integrations.
| Field | Required | Notes |
|---|---|---|
| apiKey | Yes | Your dev_ or prod_ license key. |
| projectId | Yes | Project identifier from your dashboard. |
| container | Yes | HTMLElement that will host the editor. |
| showCredit | No | Hide the credit watermark if your plan allows it. |
| initialState | No | Load a saved design state on boot. |
| services.aiEndpoint | No | Custom AI endpoint for Magic Write. |
| services.unsplashProxyBaseUrl | No | Proxy Unsplash requests through your backend. |
| services.licenseRequest | No | Extra metadata sent to license validation (origin, customerId, sdkVersion). |
| services.licenseTimeoutMs | No | Timeout in milliseconds for license validation. |
| assets.injectTailwind | No | Disable if your site already ships Tailwind. |
| assets.injectFont | No | Disable if you load fonts yourself. |
| assets.injectBaseStyles | No | Adds minimal base styles for the editor root. |
| assets.showLoader | No | Show a branded loader while assets load. |
| customPanels | No | Add custom sidebar tabs and panels (SDK only). |
| ui.hideDefaultPanels | No | Hide all built-in sidebar tabs (SDK only). |
| ui.hiddenPanels | No | Hide specific panels by id (default or custom). |
You can add your own tabs and panels in the SDK, hide any of the vanilla editor tabs, or show only custom tabs. This is client-side only and does not change your server licensing configuration.
Provide a customPanels array. Each panel gets access to the
editor store, current state, and helpers like
closePanel() and setActivePanel().
Use ui.hideDefaultPanels to remove all built-in tabs, or
ui.hiddenPanels to hide specific tabs by id.
import { createFraczledEditor, ToolType } from "@fraczled/sdk";
createFraczledEditor({
apiKey: "dev_your_key",
projectId: "proj_123",
container: document.getElementById("fraczled-editor"),
ui: {
hideDefaultPanels: false,
hiddenPanels: [ToolType.TEMPLATES, ToolType.BRAND]
},
customPanels: [
{
id: "my-product:approvals",
label: "Approvals",
render: ({ store, state, closePanel }) => (
<div>
<p>Selected: {state.selection.length}</p>
<button onClick={() => store.exportJSON()}>Export JSON</button>
<button onClick={closePanel}>Close</button>
</div>
)
}
]
});
customPanels restores vanilla panels.Use events to react to user actions. Save JSON when you want to persist a design and reload it later.
editor.on("save", (payload) => {
console.log("User saved", payload);
});
const json = editor.save();
editor.store.loadJSON(json);
The SDK validates license keys against the Fraczled licensing server and returns plan details + entitlements. You can use those to gate features or show upgrade prompts inside your app.
{
"isValid": true,
"plan": "team",
"showWatermark": true,
"entitlements": {
"features": { "templates": true, "draw": true },
"limits": { "maxPages": 50 }
},
"upgradeUrl": "https://fraczled.com/upgrade"
}
Need help integrating or debugging an embed?
Email: support@fraczled.com
Docs: https://www.fraczled.com/doc
GitHub: https://github.com/fraczled/sdk/issues