Skip to content

Frame (editor) ​

The base theme ships a module, Frame Editor (modules/frame_editor), that turns the components of your theme into Frame, a visual page builder. Editors place components, fields, views and blocks on a page, and Drupal renders the result as normal Single Directory Components: the published page loads no editor code.

The module lives inside the theme folder, and Drupal finds it there. It works only when the default theme is the Frame theme or one of its subthemes (the status report says so otherwise). It was developed and tested on Drupal 11.4.

Every feature in a screenshot: Gallery. Every video: Demos.

Features ​

Each page has a video, what the feature does and its limitations.

Build a page ​

FeatureWhat it does
Building a pagethe canvas, the Blocks panel and its search, drag and drop, a new page
Structurethe tree of the page: find, select several, move, delete, group
Editing a componentfields made from the props of a component: text, links, images, rich text, tokens
Layout and stylespacing, size, width (wide, full, band), alignment, text, background, border, position, per breakpoint
LayoutsColumns, Flex, Stack and other components with slots
Components of the base themea ready set: hero, heading, text, button, card, quote, accordion, call to action…
Fields and Drupal blocksthe fields of the page with a formatter, and Drupal blocks with their settings
Viewsviews placed on a page, drawn by Views or by an interactive component
Paragraphsparagraph types as blocks, edited with their own form
Content and page settingsthe node form inside the editor: fields, menu, title, state, URL alias
Field groupseach top-level group of the form is a panel of its own

Reuse ​

FeatureWhat it does
Librarysave a block and use it on other pages, linked or as a copy
Presetsnamed values for the options of a component, with locks
Templateswhole pages that new pages start from
Layouts per Manage displayhow an entity looks in a view mode (a teaser, a card), designed in Frame
Copy and pastecomponents between pages and sites, with the keyboard
Export and importa page as a JSON file, with a check on the way in

Work on a page ​

FeatureWhat it does
Previewthe page with unsaved changes, at the widths of the theme's breakpoints
History and saved versionsundo, redo, a timeline of changes, and the revisions of the page
Translationone structure for all languages, or a free copy per language
Live editingseveral people on one page at once
AI assistanta chat that composes the page from your components

Set up and integrate ​

PageAbout
Recipesset a site up in one command: media, responsive images, paragraphs, meta tags, AI
UI Patternsthe same components as blocks, layouts, formatters and views styles
UI kityour design tokens and components in Frame
Architecturewhat is stored, how a page is rendered, how the editor works
Build a sitethe whole way, from an empty Drupal to a page

Enable it ​

bash
drush en frame_editor

Or apply a recipe, which also sets up media, responsive images and a role for editors, and optionally paragraphs, meta tags and the AI assistant:

bash
drush recipe themes/contrib/frame/recipes/frame_editor --input=frame_editor.theme=my_theme

A release archive of the theme has the compiled editor. From a git checkout, build it once:

bash
cd web/themes/contrib/frame
npm run builder:install && npm run builder:build

Then switch the editor on for a content type: Structure → Content types → (type) → Frame. It has no permission of its own: who may edit a page of that type builds it, and who may create one starts it in the editor. The module adds a ready content type, Landing page. See Building a page.

For such a content type:

  • Edit is the editor. /node/N/edit opens it, and so does the add page; other content types keep the normal form.
  • The full page is the layout. Once a page has a layout, its full view shows only that layout. Fields appear where an editor places them. Teasers and other view modes keep their display.

Limits ​

The limits of each feature are on its page. For the editor as a whole:

  • It works only with the Frame theme or a subtheme of it as the default theme.
  • It edits nodes. Other entities have a layout only as templates, the display layouts and saved blocks.
  • Views are placed without contextual filters. Blocks that need a context other than the page are not offered.
  • History covers the layout, not the node form.

Develop the editor ​

The editor is a React app in modules/frame_editor/editor, built with Vite into modules/frame_editor/js (the built files are committed: run npm run builder:build after changing the sources). Architecture lists its sources.

Command (in the base theme folder)Does
npm run builder:installinstalls the editor's dependencies
npm run builder:build / builder:watchbuilds the editor
npm testincludes the editor's unit tests
BASE_URL=… npm run builder:smokebrowser smoke test against a site with the module enabled (Playwright, see demo/)