RedDokia API Reference / RedDokiaProps
Interface: RedDokiaProps
Props accepted by the top-level <RedDokia /> component.
Properties
| Property | Type | Description |
|---|---|---|
className? | string | Optional CSS class name appended to .reddokia-root. |
groupActions? | unknown | Global custom component or DOM mount handler rendered on the right side of each docked group header bar unless overridden by viewSchema.groupActions. |
injectStyles? | boolean | Whether 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? | RedDokiaLayoutSchema | Declarative layout schema used on initial mount and when resetLayout() is invoked. |
locale? | RedDokiaLocale | Active UI language locale ('en', 'ko', or 'ja', 'en' by default). |
localeStrings? | RedDokiaLocaleOverrides | Partial 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) => void | Fired whenever the workbench layout state changes. |
onReady? | (controller) => void | Invoked once the workbench mounts with the imperative RedDokiaController handle. |
onViewResize? | (events) => void | Fired once per layout frame with a viewId-keyed map of all visible views whose solved pixel dimensions changed. |
popoutFavicon? | string | Optional 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? | string | localStorage key used to automatically persist and restore layout snapshots across reloads. |
style? | RedDokiaStyle | Optional inline style object applied to .reddokia-root. |
styleNonce? | string | Optional Content Security Policy (CSP) nonce applied to auto-injected <style> tags (including pop-out windows). |
tabContextMenu? | RedDokiaTabContextMenuOption | Global 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? | RedDokiaThemeId | Initial 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). |
views | RedDokiaViewSchema<Record<string, any>>[] | Collection of view specifications available in the workbench. |