Skip to content

RedDokia API Reference / RedDokiaProps

Interface: RedDokiaProps ​

Props accepted by the top-level <RedDokia /> component.

Properties ​

PropertyTypeDescription
className?stringOptional CSS class name appended to .reddokia-root.
groupActions?unknownGlobal custom component or DOM mount handler rendered on the right side of each docked group header bar unless overridden by viewSchema.groupActions.
injectStyles?booleanWhether RedDokia automatically injects its scoped .rd-* <style> tag into <head> (true by default). Set to false in Strict CSP environments when loading reddokia/style.css externally.
layout?RedDokiaLayoutSchemaDeclarative layout schema used on initial mount and when resetLayout() is invoked.
locale?RedDokiaLocaleActive UI language locale ('en', 'ko', or 'ja', 'en' by default).
localeStrings?RedDokiaLocaleOverridesPartial UI string overrides — accepts either a flat Partial<RedDokiaLocaleStrings> or a per-locale map ({ ko?: ..., en?: ..., ja?: ... }).
onBeforeCloseView?(viewId, viewSchema?) => boolean | void | Promise<boolean>Synchronous or asynchronous guard invoked before a view closes; return false (or Promise<false>) to cancel closing.
onExternalNativeDrop?(event) => | void | RedDokiaExternalDragOptions | RedDokiaExternalDragOptions[]Optional HTML5 native drag-and-drop handler invoked when OS files or draggable="true" elements are dropped onto the docking grid. Returning one or more RedDokiaExternalDragOptions automatically registers and docks them into the dropped group/zone. Example onExternalNativeDrop: ({ files }) => files.map((file, idx) => ({ viewId: file-${Date.now()}-${idx}, templateId: 'editor-template', title: file.name, params: { file }, }))
onLayoutChange?(state) => voidFired whenever the workbench layout state changes.
onReady?(controller) => voidInvoked once the workbench mounts with the imperative RedDokiaController handle.
onViewResize?(events) => voidFired once per layout frame with a viewId-keyed map of all visible views whose solved pixel dimensions changed.
popoutFavicon?stringOptional custom favicon URL (or data: URI) applied to OS-level native pop-out browser windows. When omitted, pop-out windows inherit <link rel*="icon"> from the host document and fall back to the built-in RedDokia SVG favicon if the host defines none.
storageKey?stringlocalStorage key used to automatically persist and restore layout snapshots across reloads.
style?RedDokiaStyleOptional inline style object applied to .reddokia-root.
styleNonce?stringOptional Content Security Policy (CSP) nonce applied to auto-injected <style> tags (including pop-out windows).
tabContextMenu?RedDokiaTabContextMenuOptionGlobal right-click tab context menu configuration applied to all tabs unless overridden by viewSchema.tabContextMenu. Accepts a static item array, a resolver callback (mode: 'append'), or { mode: 'append' | 'replace', items }.
theme?RedDokiaThemeIdInitial theme ID ('dark', 'light', or a custom key registered in themes; 'dark' by default).
themes?Record<string, RedDokiaCustomThemeDefinition>Named custom theme registry ({ ocean: { base: 'dark', ... }, warmPaper: { base: 'light', ... } }). Also supports partial per-theme overrides for built-in 'dark' and 'light'.
themeTokens?Partial<RedDokiaTheme>Common design-token overrides applied across all themes as shared defaults (overridden by per-theme entries in themes).
viewsRedDokiaViewSchema<Record<string, any>>[]Collection of view specifications available in the workbench.