Document Shell Suite — 6 components for building full-page document editors.
Provides the structural layout primitives for a Google Docs / Notion-style document editing experience: header with title and status, collapsible sidebar, footer status bar, and breadcrumb navigation.
Components
document_editor/1— full-page flexbox layout shell with header/toolbar/content/sidebar/footer slotsdocument_header/1— top bar with title, share button, and save status indicatordocument_title/1— contenteditable<h1>for the document titledocument_sidebar/1— collapsible right panel with tab navigationdocument_footer/1— status bar with word count, page count, zoom, save statusdocument_breadcrumb/1— breadcrumb trail with "/" separators
Summary
Functions
Renders a breadcrumb trail with "/" separators.
Renders a full-page document editor layout with flexbox.
Renders a document status bar at the bottom.
Renders a document header with title, save status indicator, and share button.
Renders a collapsible right sidebar panel with tab navigation.
Renders a contenteditable <h1> for the document title.
Functions
Renders a breadcrumb trail with "/" separators.
Each item in :items should be a map with :label and optional :href keys.
The last item is rendered as plain text (current page).
Example
<.document_breadcrumb items={[
%{label: "Documents", href: "/docs"},
%{label: "Projects", href: "/docs/projects"},
%{label: "Q4 Report"}
]} />Attributes
items(:list) - Defaults to[].class(:string) - Defaults tonil.- Global attributes are accepted.
Renders a full-page document editor layout with flexbox.
Arranges header, toolbar, content (with optional sidebar), and footer in a vertical stack. The content area fills all remaining vertical space.
Example
<.document_editor id="my-doc">
<:header>
<.document_header id="doc-header" title="My Document" />
</:header>
<:toolbar>
<.rich_toolbar editor_id="editor" />
</:toolbar>
<:content>
<div id="editor-content" contenteditable="true" />
</:content>
<:sidebar>
<.document_sidebar id="doc-sidebar" />
</:sidebar>
<:footer>
<.document_footer word_count={@word_count} />
</:footer>
</.document_editor>Attributes
id(:string) (required)class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
header- Document header area.toolbar- Editor toolbar area.content(required) - Main editor content area.sidebar- Collapsible sidebar panel.footer- Status bar / footer area.
Renders a document header with title, save status indicator, and share button.
Example
<.document_header id="hdr" title="Q4 Report" status={:saving} share_count={3} />Attributes
id(:string) (required)title(:string) - Defaults to"Untitled".status(:atom) - Defaults to:saved. Must be one of:saved,:saving, or:unsaved.share_count(:integer) - Defaults to0.class(:string) - Defaults tonil.- Global attributes are accepted.
Renders a collapsible right sidebar panel with tab navigation.
Tabs allow switching between Comments, Outline, History, and Info views.
The sidebar collapses to zero width when :open is false.
Example
<.document_sidebar id="sidebar" open={@sidebar_open} active_tab={@sidebar_tab}>
<p>Sidebar content here</p>
</.document_sidebar>Attributes
id(:string) (required)open(:boolean) - Defaults tofalse.active_tab(:atom) - Defaults to:comments. Must be one of:comments,:outline,:history, or:info.class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block
Renders a contenteditable <h1> for the document title.
Emits phx-blur with the updated text for server-side persistence.
Example
<.document_title id="doc-title" value={@doc_title} />Attributes
id(:string) (required)value(:string) - Defaults to"".placeholder(:string) - Defaults to"Untitled document".class(:string) - Defaults tonil.- Global attributes are accepted.