Import the registration module

This preview imports the local definition helper, which registers the element automatically. Calling the helper again is safe.

Import the guarded definition helper

<form-multi-switch
  name="view" label="View"
  choices='[
    {"label":"List","value":"list"},
    {"label":"Grid","value":"grid"},
    {"label":"Table","value":"table"}
  ]'
  value="list"
></form-multi-switch>

import { defineFormMultiSwitch } from '../define.js';
defineFormMultiSwitch();

To use unpkg on your own site, pin the registration module. The component installs its default styles automatically:

import 'https://unpkg.com/@aarongustafson/form-multi-switch@0.0.1/define.js';

All examples