Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 888 Bytes

README.md

File metadata and controls

32 lines (21 loc) · 888 Bytes

Carbonara

This is a custom element to compute web navigation carbon footprint.

Usage

CDN

<script type="module" src="https://unpkg.com/@digital4better/carbonara@latest/dist/carbonara.js"></script>
 
<p>Your navigation has emitted <carbon-ara></carbon-ara> so far.</p>

Locally

npm install @digital4better/carbonara
<script type="module" src="./node_modules/@digital4better/carbonara/dist/carbonara.js"></script>

<p>Your navigation has emitted <carbon-ara></carbon-ara> so far.</p>

Supported properties

Attribute Type Default value Description
position "top", "bottom" "top" the tooltip position
persistance "none", "session", "local" "none" when set to "none" the footprint will be reset on page refresh. "local" and "session" will persist footprint in navigator storage.