RedDokia API Reference / RedDokiaViewSchema
Interface: RedDokiaViewSchema<TParams>
Descriptor registering a panel or document view's metadata, constraints, and component renderer.
Type Parameters
| Type Parameter | Default type |
|---|---|
TParams | Record<string, any> |
Properties
| Property | Type | Description |
|---|---|---|
badge? | string | number | Optional counter or status badge displayed on the tab and edge-bar button. |
closable? | boolean | Whether the user can close this view tab (true by default). |
component? | RedDokiaViewComponent<TParams> | Component or mount handler used to render this view's content body across React, Vue, Svelte, or Vanilla environments. |
dirty? | boolean | Marks the view as having unsaved changes (displays a dirty indicator dot on the tab). |
eagerMount? | boolean | Mounts the view component immediately even before its tab is first activated (false = lazy mount on first activation). |
groupActions? | unknown | Per-view custom component or DOM mount handler rendered on the right side of the host group header bar when this view is active. Takes precedence over the global groupActions prop for this view and any dynamic tabs cloned from it via templateId. |
icon? | RedDokiaIconValue | Icon rendered alongside the view title (RedDokiaIcons.* constant, built-in icon name, inline SVG, DOM node, or framework icon component). |
id | string | Unique identifier of the view instance. |
maxHeight? | number | Maximum content height constraint in pixels contributed to its host group. |
maxWidth? | number | Maximum content width constraint in pixels contributed to its host group. |
minHeight? | number | Minimum content height constraint in pixels contributed to its host group. |
minWidth? | number | Minimum content width constraint in pixels contributed to its host group. |
onBeforeClose? | (viewId, viewSchema?) => boolean | Promise<boolean> | Optional per-view close guard executed before closing this tab. When defined, takes precedence over the global onBeforeCloseView callback; return false or a Promise<false> to abort closing. |
params? | TParams | Custom serializable parameters passed into the view's component. |
pinned? | boolean | Pins the tab to the leading edge of its group tab bar and prevents accidental closing. |
tabContextMenu? | RedDokiaTabContextMenuOption | Per-view right-click tab context menu configuration (static array, resolver callback, or { mode, items }). Takes precedence over the global tabContextMenu prop for this view and any dynamic tabs cloned from it via templateId. |
templateId? | string | Optional base view template ID used to resolve renderer/component definitions for dynamically spawned instances. |
title? | string | Display title shown on the tab and edge bar button (defaults to a humanized label derived from id when omitted). |