An hr
tag with style. Be sure to copy the file ./dist/wave.svg
into the root public folder on your web server. The CSS depends on that file.
npm i -S @substrate-system/wavy-hr
ESM and common JS via package.json exports
field.
import '@substrate-system/wavy-hr'
require('@substrate-system/wavy-hr')
import '@substrate-system/wavy-hr/css'
Or minified:
import '@substrate-system/wavy-hr/css/min'
This calls the global function customElements.define
. Just import, then use
the tag in your HTML.
import '@substrate-system/wavy-hr'
<div>
<wavy-hr></wavy-hr>
</div>
This package exposes minified JS files too. Copy them to a location that is accessible to your web server, then link to them in HTML.
cp ./node_modules/@substrate-system/wavy-hr/dist/index.min.js ./public/wavy-hr.min.js
<script type="module" src="./wavy-hr.min.js"></script>