Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 5 days ago
JSON representation
Boilerplate for creating a custom element.
- Host: GitHub
- URL: https://github.com/github/custom-element-boilerplate
- Owner: github
- License: mit
- Created: 2018-06-25T18:52:24.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-04T15:08:53.000Z (3 months ago)
- Last Synced: 2024-12-25T12:05:19.257Z (12 days ago)
- Topics: custom-elements, web-components
- Language: TypeScript
- Size: 1.12 MB
- Stars: 166
- Watchers: 285
- Forks: 25
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-web-components - custom-element-boilerplate - Boilerplate for creating a custom element. (Meta Frameworks / Starter Kits)
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.