Resources

Alpha: Editor React Components are currently in alpha. This feature is subject to change and may have bugs, issues, and limitations. We're actively improving it based on your feedback.

The resources property declares the code and assets that make up your component.

When you build with the CLI, it handles resource management automatically: bundling your code, uploading assets, and generating the resource URLs.

Where to define

You can only define resources at the root level of your manifest, alongside properties like type and editorElement. The resources property is required, and at minimum, you need client.componentUrl.

Resources properties

The resources object supports the following properties:

clientClientRequired

Component bundle and assets for the live site.


editorEditor

Component bundle and assets for the editor. Use when your component needs editor-specific behaviors like displaying hover states, showing expanded views, or rendering mock data.


serverServer

Component bundle for server-side rendering (SSR), improving initial load performance and SEO.


sdkSDK

SDK bundle that exposes your component's API for programmatic interaction.


Important: Your server bundle must avoid browser-specific APIs like window and document. If your component relies on these APIs, provide a fallback that renders static content on the server.

Examples

Minimal resources

The simplest configuration, with only the required client.componentUrl:

Copy

Client with default CSS

A client bundle with a CSS file. The CSS is rendered once per page, regardless of how many instances of the component exist:

Copy

Client and editor bundles

Separate bundles for the live site and the editor:

Copy

Full resources configuration

A complete resources object with all supported properties:

Copy

See also

Did this help?