Skip to content

ComponentContributionInput

ComponentContributionInput<TComponent, TProps> = { access?: SlotAccessPredicate; after?: string | string[]; before?: string | string[]; component: ApplyComponent<TComponent, TProps>; condition?: FieldCondition; hidden?: boolean; id: string; order?: number; } | { component?: never; hidden: true; id: string; }

Defined in: packages/core/src/components/types.ts:153

One additive entry in a slot list (beforeInput/afterInput, blocks.item.actions, blocks.header.actions, array.item.actions) — either a real contribution, or a directive hiding a built-in by id (S4/S9).

TComponent extends ComponentHKT

The framework’s ComponentHKT. Type-erased to the base ComponentHKT wherever a slot is declared outside a framework-typed context (root admin.components, exactly like editor?: VexEditorAdapter<ComponentHKT> on VexClientConfigInput).

TProps

The props the slot’s resolved component receives.

{ access?: SlotAccessPredicate; after?: string | string[]; before?: string | string[]; component: ApplyComponent<TComponent, TProps>; condition?: FieldCondition; hidden?: boolean; id: string; order?: number; }

optional access?: SlotAccessPredicate

Gates mounting — reuses RBAC (S11). Checked before condition.

optional after?: string | string[]

Id(s) this contribution must render after.

optional before?: string | string[]

Id(s) this contribution must render before.

component: ApplyComponent<TComponent, TProps>

The contribution’s component, referenced directly (S7) — React.lazy(() => import(...)) is a valid value for a React ComponentHKT.

optional condition?: FieldCondition

Gates mounting — same (data, siblingData) signature as admin.condition (Step 6, S11). Checked after access.

optional hidden?: boolean

Omit this contribution from the resolved list without removing the entry (keeps order/before/after documented in place).

id: string

Stable identifier (S2/S9) — vex.-prefixed for built-ins, otherwise project/plugin-chosen. Duplicate ids within one resolved list are a VexComponentConfigError.

optional order?: number

Sort key; ties broken by array position. Default 0.


{ component?: never; hidden: true; id: string; }

optional component?: never

hidden: true

Always true — a hide directive carries no component.

id: string

The id of an EXISTING contribution (usually a built-in) in this same resolved list to hide.