v4 to v5
v4 to v5
💡 Good to know
This change only affects applications that use Cosmos Web Components in Vanilla Javascript.
With version 5, we are resolving the previously introduced (Q1 2023) deprecation of the API to manually define components with the browser's custom elements registry.
The functions for defining components have been renamed. Whereas before a typical Component Definition was called defineCosmosButton() it has been renamed to defineCustomElementCosmosButton(). This schema applies to all component definitions and can be derived by starting with defineCustomElement followed by specifying the component name in PascalCase. defineCustomElement[CosmosComponent]
The defineCustomElements() function to define all Components at the same time is still available to use and wasn't subject to any changes.