Skip to content

GlobalAdminConfigInput

Defined in: packages/core/src/globals/types.ts:26

User-facing admin panel configuration input for defineGlobal().

Intentionally narrower than AdminCollectionConfigInput — globals cannot be relationship targets (no picker), have no list view (no table config), and always use label as the admin page title (no useAsTitle). Consequently this interface has only one generic: TComponent.

TComponent extends ComponentHKT = ComponentHKT

Component HKT binding; defaults to ComponentHKT.

TGlobalSlug extends GlobalSlug = GlobalSlug

TDrafts extends boolean = false

optional components?: object

Defined in: packages/core/src/globals/types.ts:56

Custom React component for rendering this global in contexts where a compact preview is needed (e.g. future cross-global reference UI). Typed via the HKT machinery — resolves to ComponentType<...> in React.

optional edit?: EditComponentsConfigInput<TComponent>

Global-level edit.* slot contributions and built-in overrides (decision 11/14) — merged with the project-wide config of the same shape by resolveEditSlot at render time.

optional preview?: ApplyComponent<TComponent, { slug: string; }>


optional description?: string

Defined in: packages/core/src/globals/types.ts:39

Short description shown beneath the global label in GlobalsListView.


optional group?: string

Defined in: packages/core/src/globals/types.ts:35

Sidebar group label this global appears under (e.g. "Site Builder"). Ungrouped when omitted.


optional icon?: string

Defined in: packages/core/src/globals/types.ts:50

Lucide icon name shown in the admin sidebar. See https://lucide.dev/icons/


optional livePreview?: AdminLivePreviewConfigInput<Partial<DocumentByGlobalSlug<TGlobalSlug>>>

Defined in: packages/core/src/globals/types.ts:45

Live preview for this global — the resolver from the global document to the public URL its preview iframe renders, plus panel behaviour. Omit to disable live preview for this global.


optional versions?: object

Defined in: packages/core/src/globals/types.ts:70

Draft and versioning config for this global. Enabling drafts adds vex_status / vex_publishedAt / vex_publishedId to vex_globals (generateVexSchema) and the draft-workflow actions (readDrafts, saveDraft, publish, unpublish, deleteVersions) to this global’s subject in defineAccess. Reuses the shared vex_versions table and the same two-row model as a versioned collection, scoped by collection: "vex_globals" (design-review §9).

optional autosave?: object

Debounce background saves to the draft row while the edit form is open. Ignored when drafts is false.

false

optional debounceMs?: number

Debounce (milliseconds) to autosave after inputs have changed

enabled: boolean

Enable or disable autosaves to new drafts

optional drafts?: TDrafts

Enable the draft/publish workflow for this collection.

false