This example imports the local class module and registers the element explicitly. You can also import the class from a CDN.
<form-multi-switch>
<fieldset>
<legend>Reading layout</legend>
<label><input type="radio" name="layout"
value="list" checked>List</label>
<label><input type="radio" name="layout"
value="grid">Grid</label>
<label><input type="radio" name="layout"
value="table">Table</label>
</fieldset>
</form-multi-switch>
import { FormMultiSwitchElement } from '../form-multi-switch.js';
customElements.define('form-multi-switch', FormMultiSwitchElement);
To use esm.sh on your own site, pin the CDN import. The component installs its default styles automatically:
import { FormMultiSwitchElement } from
'https://esm.sh/@aarongustafson/form-multi-switch@1.0.1/form-multi-switch.js';