mirror of
https://github.com/github/custom-element-boilerplate
synced 2026-07-21 14:13:52 +00:00
No description
- TypeScript 50.9%
- Dockerfile 32.5%
- JavaScript 16.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .devcontainer | ||
| .github/workflows | ||
| examples | ||
| src | ||
| test | ||
| .eslintignore | ||
| .eslintrc.json | ||
| .gitattributes | ||
| .gitignore | ||
| CODE_OF_CONDUCT.md | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| custom-elements-manifest.config.js | ||
| custom-elements.json | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| SECURITY.md | ||
| tsconfig.json | ||
| vscode.html-custom-data.json | ||
| web-dev-server.config.js | ||
| web-test-runner.config.js | ||
<custom-element> element
Boilerplate for creating a custom element.
Installation
Available on npm as @github/custom-element-element.
$ npm install --save @github/custom-element-element
Usage
Script
Import as ES modules:
import '@github/custom-element-element'
Include with a script tag:
<script type="module" src="./node_modules/@github/custom-element-element/dist/index.js">
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 require a polyfill.
- Chrome
- Firefox
- Safari
- Microsoft Edge
License
Distributed under the MIT license. See LICENSE for details.