Lime Web Components API Documentation - v6.24.0
    Preparing search index...

    Interface ComponentDescriptor<V>

    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.

    const descriptor: ComponentDescriptor = {
    name: 'customer-insights-config',
    props: { defaultView: 'monthly' },
    };
    interface ComponentDescriptor<V = unknown> {
        name: string;
        props?: Record<string, V>;
        rules?: { visibility?: Rule };
    }

    Type Parameters

    • V = unknown
    Index

    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.

    Type Declaration

    • Optionalvisibility?: 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.

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

    Rule