Some front-end frameworks support custom elements better than others.
Using a CDN
Include the following in your HTML file:
Using NPM Install
If you don’t want to use the CDN, you can install Medblocks UI from npm with the following command.
npm install medblocks-ui
yarn add medblocks-ui
pnpm add medblocks-ui
You also need to import the CSS file for styling to work. To import the default CSS file:
import "medblocks-ui" import "medblocks-ui/dist/styles.js"
If you intend on using other Shoelace.style elements, import both the modules together. The default styling of shoelace is automatically imported:
import "medblocks-ui" import "medblocks-ui/dist/shoelace"
Importing a different version of Shoelace.style will cause a clash in the custom element registry. When using Medblocks and Shoelace together, always import as mentioned above.