layouts

An app state of the layouts. You can obtain the layouts state and integrate it with React components.

You can change the layout components with Layout Manager.


Data Structure

A map of Record<string, LayoutComponents> where:

  • string: The layout name
  • LayoutComponents: An array of React component class names

Get the layouts state manually:

const { layouts } = inkdrop.store.getState()

Connect the state with your React component:

import { useSelector } from 'react-redux'
const selector = ({ layouts }) => layouts
const MyComponent = props => {
  const layouts = useSelector(selector)
  // render
}

Example values

{
  "main:full": [
    "ModalLayout",
    "SideBarLayout",
    "NoteListBarLayout",
    "EditorLayout"
  ],
  "main:slim": [
    "ModalLayout",
    "NoteListBarLayout",
    "EditorLayout"
  ],
  "main:distraction-free": [
    "ModalLayout",
    "EditorLayout"
  ],
  "sidebar": [
    ...
}

Available Layouts

main:full

The main layout that consists of 3 columns.

Default values

[
  "ModalLayout",
  "SideBarLayout",
  "NoteListBarLayout",
  "EditorLayout"
]

main:slim

The main layout that consists of 2 columns.

Default values

[
  "ModalLayout",
  "NoteListBarLayout",
  "EditorLayout"
]

main:distraction-free

The main layout for distraction-free mode.

Default values

[
  "ModalLayout",
  "EditorLayout"
]

The sidebar layout

Default values

[
  "SideBarHeader",
  "SideBarNavigation",
  "SideBarSyncStatusView",
  "SideBarPluginUpdatesNotificationView"
]

The menu layout of sidebar

Default values

[
  "SideBarMenuItemAllNotes",
  "SideBarMenuSectionNotebooks",
  "SideBarMenuBookListRoot",
  "SideBarMenuItemTrash",
  "SideBarMenuSectionStatus",
  "SideBarMenuStatusList",
  "SideBarMenuSectionTags",
  "SideBarMenuTagList"
]

The menu layout of sidebar workspace menu

Default values

[
  "SidebarWorkspaceMenuTitle",
  "SideBarWorkspaceMenuAllNotes",
  "SideBarMenuSectionNotebooks",
  "SideBarWorkspaceMenuBookList",
  "SideBarMenuSectionStatus",
  "SidebarWorkspaceMenuStatusList",
  "SideBarMenuSectionTags",
  "SidebarWorkspaceMenuTagList"
]

note-list-bar

The menu layout of note list bar

Default values

[
  "NoteListHeader",
  "NoteListSearchBar",
  "NoteListBarContainer"
]

note-list-bar:trash

The trash menu layout of note list bar

Default values

[
  "NoteListHeader",
  "NoteListBarContainer"
]

mde

The mde layout

Default values

[
  "Editor"
]

editor

The editor layout

Default values

[
  "EditorDrawer",
  "EditorFloatingActions",
  "EditorHeaderLayout",
  "EditorMetaLayout",
  "EditorToolbar",
  "MDELayout",
  "MDESearchBar",
  "EditorStatusBarLayout"
]

editor-header

The header layout of the editor

Default values

[
  "EditorHeaderTitleInput",
  "EditorHeaderMore"
]

editor-meta

The meta pane layout of the editor

Default values

[
  "EditorMetaNotebook",
  "EditorMetaStatusPicker",
  "EditorMetaTags"
]

The layout for modal components

Default values

[
  "NewNotebookDialog",
  "DeleteNotebookDialog",
  "RenameNotebookDialog",
  "TagSettingsDialog",
  "DeleteTagDialog",
  "AssistiveErrorDialog",
  "MoveNotesDialog",
  "MoveNotebookDialog",
  "EmptyTrashDialog",
  "ShareNoteDialog",
  "NoteRevisionsDialog"
]

editor-toolbar

The toolbar layout of the editor

Default values

[]

editor-drawer-menu

The editor drawer menu items

Default values

[
  "EditorDrawerSectionHeaderNoteInformation",
  "EditorDrawerMenuItemNotebook",
  "EditorDrawerItemStatus",
  "EditorDrawerItemTags",
  "EditorDrawerItemCreatedDate",
  "EditorDrawerItemUpdatedDate",
  "EditorDrawerSeparator-1",
  "EditorDrawerSectionHeaderActions",
  "EditorDrawerActionButtonDuplicate",
  "EditorDrawerActionButtonCopyNoteLink",
  "EditorDrawerActionButtonPinToTop",
  "EditorDrawerActionButtonOpenNoteInSeparateWindow",
  "EditorDrawerSeparator-2",
  "EditorDrawerActionButtonDeleteNote",
  "EditorDrawerActionButtonRevisionHistory",
  "EditorDrawerSeparator-3",
  "EditorDrawerActionButtonShare"
]

editor-status-bar

The status bar layout of the editor

Default values

[]

editor-floating-actions

The floating action buttons on the editor

Default values

[
  "EditorFloatingActionTogglePreview",
  "EditorFloatingActionToggleSideBySide"
]
Can you help us improve the docs? 🙏

The source of these docs is here on GitHub. If you see a way these docs can be improved, please fork us!