Retrieves all registered web components with their metadata.
This method returns the complete list of components that have been registered with the registry, including all their metadata. This is useful for:
The returned array includes both components registered with full metadata and those registered with just a name.
An array of WebComponentMetadata objects representing all registered components.
import { PlatformServiceName } from '@limetech/lime-web-components';
const registry = platform.get(PlatformServiceName.WebComponentRegistry);
const startPageWidgets = registry
.getAll()
.filter((component) => component.tags?.includes('start-page'));
const salesDashboard = registry
.getAll()
.find((component) => component.name === 'sales-dashboard');
Registers a web component with optional metadata.
This method associates the component tag name with metadata that can be used for discovery, display, and configuration purposes. The metadata includes human-readable information like title and description, as well as organizational data like icons and tags.
Register during application setup, before any UI reads the registry. A component that registers itself when it loads can never appear in the picker used to choose it, because that picker lists components which have not been created yet.
If the same name is registered more than once, the last registration wins.
The tag name of the web component (e.g., 'sales-dashboard'). Must match the actual custom element tag name.
Optionalconfig: Omit<WebComponentMetadata, "name">Optional metadata configuration for the component. Includes title, description, icon, tags, and configuration UI settings. If omitted, only the component name is registered.
import { PlatformServiceName } from '@limetech/lime-web-components';
const registry = platform.get(PlatformServiceName.WebComponentRegistry);
registry.register('my-list-view', {
title: 'List',
description: 'View your items in a simple and organized list format',
icon: { name: 'activity_feed_2' },
tags: ['explorer-view'],
configComponent: {
name: 'my-list-view-configuration',
},
});
Central registry for web components with enhanced metadata.
The WebComponentRegistry provides a way to associate rich metadata with web components, making them discoverable and configurable within the Lime CRM platform. While most custom elements don't require registration, registering a component allows it to:
Registration is particularly useful for:
Components are registered by their tag name and can include metadata like title, description, icon, tags, and optional configuration UI components.
Example
See