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).
Type Parameters
Section titled “Type Parameters”TComponent
Section titled “TComponent”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
Section titled “TProps”TProps
The props the slot’s resolved component receives.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ access?: SlotAccessPredicate; after?: string | string[]; before?: string | string[]; component: ApplyComponent<TComponent, TProps>; condition?: FieldCondition; hidden?: boolean; id: string; order?: number; }
access?
Section titled “access?”
optionalaccess?:SlotAccessPredicate
Gates mounting — reuses RBAC (S11). Checked before condition.
after?
Section titled “after?”
optionalafter?:string|string[]
Id(s) this contribution must render after.
before?
Section titled “before?”
optionalbefore?:string|string[]
Id(s) this contribution must render before.
component
Section titled “component”component:
ApplyComponent<TComponent,TProps>
The contribution’s component, referenced directly (S7) — React.lazy(() => import(...)) is a valid value for a React ComponentHKT.
condition?
Section titled “condition?”
optionalcondition?:FieldCondition
Gates mounting — same (data, siblingData) signature as admin.condition (Step 6, S11). Checked after access.
hidden?
Section titled “hidden?”
optionalhidden?: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.
order?
Section titled “order?”
optionalorder?:number
Sort key; ties broken by array position. Default 0.
Type Literal
Section titled “Type Literal”{ component?: never; hidden: true; id: string; }
component?
Section titled “component?”
optionalcomponent?:never
hidden
Section titled “hidden”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.