Use webcomponents within AEM components | Community
Skip to main content
JeffreyVSpringbok
Level 2
Apr 14, 2023 1:25 PM UTC
Solved

Use webcomponents within AEM components

Hi

 

We would like to use a provided design system in our AEM components like the spectrum Design System of Adobe (https://opensource.adobe.com/spectrum-web-components/).

I achieved to include webcomponents via a CDN (example include Ioinic webcomponent with properties from the dialog)
 

<script src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic.js"></script> <ion-radio-group value="strawberries"> <ion-radio value="${properties.text}">This is my prop: ${properties.text}</ion-radio><br/> <ion-radio value="strawberries">Strawberries</ion-radio><br /> <ion-radio value="pineapple">Pineapple</ion-radio><br /> <ion-radio value="cherries">Cherries</ion-radio> </ion-radio-group>

 

But when I try to include it via a node_module I can't find a way to use the webcomponent.

Does anyone has any idea?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
AlbinIs1Accepted solution
Level 2
Apr 18, 2023 3:47 PM UTC

2 replies

AlbinIs1Accepted solution
Level 2
Apr 18, 2023 3:47 PM UTC
JeffreyVSpringbok
Level 2
May 4, 2023 7:48 AM UTC

Hi Albin

 

We are here talking about creating custom Webcomponents in AEM itself.
In our use case we want to embed them via an NPM package (web components are hosted and created somewhere else).

I assume that we need to bind the package to a clientlibs category and we can use it that way.

Translate