Describes a web component to create and the properties to set on it.

Used wherever the platform needs a component specified as data rather than instantiated directly — for example configuration UIs, metadata renderers, or slot content provided by plugins.

Example

const descriptor: ComponentDescriptor = {
name: 'customer-insights-config',
props: { defaultView: 'monthly' },
};

Type Parameters

  • V = unknown

Hierarchy

  • ComponentDescriptor

Properties

Properties

name: string

Tag name of the web component to create.

props?: Record<string, V>

Properties to set on the created component.

rules?: {
    visibility?: Rule;
}

Optional behavior rules.

See

Rule

Type declaration

  • Optional visibility?: Rule

    Rule that gates whether the component should be rendered. A renderer that consults this field instantiates the component only when the rule evaluates true against the current scope.

    Example

    const descriptor: ComponentDescriptor = {
    name: 'customer-insights-panel',
    rules: {
    visibility: {
    type: 'ref',
    id: 'limetech.user-has-role',
    args: { roles: ['admin'] },
    },
    },
    };