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: about 1 month 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-09-27T19:25:15.000Z (about 1 month ago)
- Last Synced: 2024-09-30T00:05:49.053Z (about 1 month ago)
- Topics: custom-elements, web-components
- Language: TypeScript
- Size: 1.26 MB
- Stars: 163
- Watchers: 272
- Forks: 24
- Open Issues: 1
-
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.