#

Some front-end frameworks support custom elements better than others.

Medblocks UI can be used with a CDN script or with a modern bundler like Vite or Snowpack.

#

Include the following in the <head> of your HTML file:

<script src="https://unpkg.com/[email protected]/dist/bundle.js"></script>
<!-- Include the CSS to style the elements -->
<link href="https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/dist/themes/light.min.css" rel="stylesheet"/>

#

If you don’t want to use the CDN, you can install Medblocks UI from npm with the following command.

Using npm:

npm install medblocks-ui

Using yarn:

yarn add medblocks-ui

Using pnpm:

pnpm add medblocks-ui

Import Medblocks UI in your Typescript or Javascript file. You can also import it in your Vue, JSX, TSX, or Svelte files. Make sure the import happens before any custom elements are used.

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";
Save lives with digital healthcare innovation
© 2024 Mediblocks. All rights reserved.