@nutrition-web-components/nutri-score

Nutri-score Web Component

Usage no npm install needed!

<script type="module">
  import nutritionWebComponentsNutriScore from 'https://cdn.skypack.dev/@nutrition-web-components/nutri-score';
</script>

README

Nutri-score Web Component

Linux Build Status npm badge MIT badge

Installing the JavaScript Web Component

Link to it by adding the following to your <head></head>.

<script src="https://unpkg.com/@nutrition-web-components/nutri-score@x.x.x/dist/nutri-score.js"></script>

The x.x.x is the specific version of the component, you should use specifc versions to prevent against breaking changes.

Usage

<nutri-score score="A"></nutri-score>
<nutri-score score="A" vertical></nutri-score>

Integrating with a Framework

This Web Component is build with Stencil to compile the component into Web Components. And since they can be used within frameworks or in standard HTML websites the best resource to read is the Stencil documentation regarding framework integration.