@molecule/app-editor-layout-solid

Feature · editor-layout · App (browser) · v1.1.2 · Apache-2.0

Editor scaffold: top bar with save/publish, main canvas, optional side panel

npm install @molecule/app-editor-layout-solid

npm · Source on GitHub

How it works

@molecule/app-editor-layout-solid is a ready-made editor-layout feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

import { EditorLayout } from '@molecule/app-editor-layout-solid'
import { EditorToolbar } from '@molecule/app-editor-toolbar-solid'

export function Editor() {
  return (
    <EditorLayout
      topBar={<EditorToolbar title="Untitled post" />}
      canvas={<ArticleEditor />}
      sidePanel={<MetadataPanel />}
      sidePanelOpen={true}
    />
  )
}

Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid

Reference

Solid editor layout scaffold.

Exports EditorLayout — sticky top bar + main canvas + optional side panel. It is the Solid counterpart of @molecule/app-editor-layout-react: the same props (React names) and the same DOM for the same input. Used for blog post editors, product editors, bot flow editors, etc.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { EditorLayout } from '@molecule/app-editor-layout-solid'
import { EditorToolbar } from '@molecule/app-editor-toolbar-solid'

export function Editor() {
  return (
    <EditorLayout
      topBar={<EditorToolbar title="Untitled post" />}
      canvas={<ArticleEditor />}
      sidePanel={<MetadataPanel />}
      sidePanelOpen={true}
    />
  )
}

Type

feature

Installation

npm install @molecule/app-editor-layout-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js

API

Interfaces

EditorLayoutProps

Props accepted by the EditorLayout component.

interface EditorLayoutProps {
  /** Sticky top bar — typically title + save/publish buttons + status indicator. */
  topBar?: JSX.Element
  /** Main editing canvas (wysiwyg, drawable area, form, code editor). */
  canvas?: JSX.Element
  /** Optional right-side settings / metadata panel. */
  sidePanel?: JSX.Element
  /** Side-panel position — defaults to `'right'`. */
  sidePanelPosition?: 'left' | 'right'
  /** Whether the side panel is currently visible. */
  sidePanelOpen?: boolean
  /** Extra classes. */
  className?: string
  /** `data-mol-id` for AI-agent selectors. */
  dataMolId?: string
}

Functions

EditorLayout(props)

Three-region editor scaffold: sticky top bar + main canvas + optional collapsible side panel.

Used by blog post editors, product-listing editors, chatbot flow editors, design canvases, etc.

function EditorLayout(props: EditorLayoutProps): JSX.Element
  • props — Component props (see EditorLayoutProps).

Returns: The rendered editor layout.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-solid ^3.14.0 || ^4.0.0
  • @molecule/app-ui ^1.0.1
  • @molecule/app-ui-solid ^1.1.0
  • solid-js ^1.8.0

Runtime Dependencies

  • @molecule/app-solid

  • @molecule/app-ui

  • @molecule/app-ui-solid

  • solid-js

  • The scaffold claims the FULL viewport height (h-screen flex column). Render it as the page root; nesting it below another fixed-height app shell produces double scrollbars.

  • The side panel container sets flex-shrink 0 but NO width — your sidePanel content must define its own width.

  • topBar is wrapped in a sticky container by the layout itself (unlike <DetailPageLayout>); the slot does not need its own stickiness, but should bring a surface background.

  • ArticleEditor and MetadataPanel above are your own components.

  • Styling resolves through getClassMap() — requires a wired ClassMap bond (standard molecule app setup). No text of its own.