No description
  • TypeScript 50.9%
  • Dockerfile 32.5%
  • JavaScript 16.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tyler Jones d2b7a39456
Merge pull request #56 from github/campaign-fix-2-1
Potential fixes for 2 code scanning alerts
2025-10-30 09:30:59 -04:00
.devcontainer Add a .devcontainer 2022-02-28 17:04:12 +00:00
.github/workflows Potential fix for code scanning alert no. 1: Workflow does not contain permissions 2025-10-29 13:02:16 -06:00
examples Use web-dev-server for local development 2022-04-29 12:43:03 +02:00
src Add description for Custom Element 2022-08-15 11:11:43 +02:00
test Convert the tests to TypeScript 2022-04-29 19:20:51 +02:00
.eslintignore Flow to TypeScript 2020-02-19 22:48:14 -05:00
.eslintrc.json Enable eslint-plugin-custom-elements 2021-04-28 08:56:44 +01:00
.gitattributes Create .gitattributes 2021-03-15 10:12:16 +00:00
.gitignore Add set up code 2018-06-25 16:49:41 -04:00
CODE_OF_CONDUCT.md Add required files 2020-02-19 17:26:27 -05:00
CODEOWNERS move AOR to primer 2022-09-23 18:52:50 +01:00
CONTRIBUTING.md Add required files 2020-02-19 17:26:27 -05:00
custom-elements-manifest.config.js prettier 2022-11-30 17:28:55 +00:00
custom-elements.json Add description for Custom Element 2022-08-15 11:11:43 +02:00
LICENSE set correct year in LICENSE 2019-05-13 09:56:13 +01:00
package-lock.json Bump braces from 3.0.2 to 3.0.3 2024-06-16 09:45:37 +00:00
package.json upgrade all dependencies 2022-11-30 17:26:33 +00:00
README.md Add description for Custom Element 2022-08-15 11:11:43 +02:00
SECURITY.md Add required files 2020-02-19 17:26:27 -05:00
tsconfig.json Convert the tests to TypeScript 2022-04-29 19:20:51 +02:00
vscode.html-custom-data.json Add description for Custom Element 2022-08-15 11:11:43 +02:00
web-dev-server.config.js prettier 2022-11-30 17:28:55 +00:00
web-test-runner.config.js prettier 2022-11-30 17:28:55 +00:00

<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.