https://github.com/aegisjsproject/component
Base component using `@shgysk8zer0/aegis` & `@shgysk8zer0/aegis-styles`
https://github.com/aegisjsproject/component
aegis constructable-stylesheets custom-elements sanitizer-api security web-components
Last synced: 4 months ago
JSON representation
Base component using `@shgysk8zer0/aegis` & `@shgysk8zer0/aegis-styles`
- Host: GitHub
- URL: https://github.com/aegisjsproject/component
- Owner: AegisJSProject
- License: mit
- Created: 2024-02-05T02:47:34.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-26T21:30:02.000Z (8 months ago)
- Last Synced: 2024-10-29T21:02:39.642Z (7 months ago)
- Topics: aegis, constructable-stylesheets, custom-elements, sanitizer-api, security, web-components
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@aegisjsproject/component
- Size: 685 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# `@aegisjsproject/component`
Base component using [`@aegisjsproject/core`](https://github.com/AegisJSProject/core)
& [`@aegisjsproject/styles`](https://github.com/AegisJSProject/styles).[](https://github.com/AegisJSProject/component/actions/workflows/codeql-analysis.yml)

[](https://github.com/AegisJSProject/component/blob/master/LICENSE)
[](https://github.com/AegisJSProject/component/commits/master)
[](https://github.com/AegisJSProject/component/releases)
[](https://github.com/sponsors/shgysk8zer0)[](https://www.npmjs.com/package/@aegisjsproject/component)


[](https://www.npmjs.com/package/@aegisjsproject/component)[](https://github.com/AegisJSProject)


[](https://twitter.com/shgysk8zer0)[](https://liberapay.com/shgysk8zer0/donate "Donate using Liberapay")
- - -- [Code of Conduct](./.github/CODE_OF_CONDUCT.md)
- [Contributing](./.github/CONTRIBUTING.md)## Example Component
```js
import { AegisComponent, TRIGGERS, SYMBOLS } from '@aegisjsproject/component';
import { html, css, appendTo, addStyles } from '@aegisjsproject/core';const template = html`
Hello, World!
`;const stlyes = css`
.foo {
color: red;
}
`export class HTMLHelloWorldElement extends AegisComponent {
constructor() {
super({ template, styles });
}
}HTMLHelloWorldElement.register('hello-world');
```