diff --git a/README.md b/README.md index dd09ae0..5a407a3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# Web Component Base Class +# Web Component Base -This is a base JavaScript class for creating Web Components easily. +This serves as a very minimal base class for creating custom elements. + +This does not aim to be an alternative to [Lit](https://lit.dev/). Lit is good; use it if you want. ## Installation @@ -12,6 +14,8 @@ npm i web-component-base When you extend the `WebComponent` class for your component, you only have to define the `template()` and `observedAttributes()`, and the UI will be reactive on attribute changes. +In your component class: + ```js // HelloWorld.mjs import { WebComponent } from "./WebComponent.mjs"; @@ -29,22 +33,23 @@ export class HelloWorld extends WebComponent {