Registration
The quickest way to register a component is to use the define
method of the respective component.
TIP
Alternatively, you can register multiple components at once by using the defineAll
method of the Minze
class. See the API reference for more information.
WARNING
Your component class name should be in PascalCase
when using this registration method.
js
import { MinzeElement } from 'minze'
class MyElement extends MinzeElement {
// ...
}
MyElement.define() // automatic naming based on the class name
MyElement.define('my-custom-element') // manual naming
js
import { MinzeElement } from 'minze'
;(class MyElement extends MinzeElement {
// ...
}).define()
html
<my-element></my-element>
<my-custom-element></my-custom-element>