Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/github/custom-element-boilerplate

Boilerplate for creating a custom element.
https://github.com/github/custom-element-boilerplate

custom-elements web-components

Last synced: about 1 month ago
JSON representation

Boilerplate for creating a custom element.

Awesome Lists containing this project

README

        

# <custom-element> element

Boilerplate for creating a custom element.

## Installation
Available on [npm](https://www.npmjs.com/) as [**@github/custom-element-element**](https://www.npmjs.com/package/@github/custom-element-element).
```
$ npm install --save @github/custom-element-element
```

## Usage

### Script

Import as ES modules:

```js
import '@github/custom-element-element'
```

Include with a script tag:

```html

```

An example Custom Element. This documentation ends up in the
README so describe how this elements works here.

You can event add examples on the element is used with Markdown.

```
<custom-element></custom-element>
```

## Browser support

Browsers without native [custom element support][support] require a [polyfill][].
- Chrome
- Firefox
- Safari
- Microsoft Edge

[support]: https://caniuse.com/custom-elementsv1
[polyfill]: https://github.com/webcomponents/custom-elements

## License

Distributed under the MIT license. See LICENSE for details.