https://github.com/ayoayco/wcb
Web Components in Easy Mode
https://github.com/ayoayco/wcb
webcomponent webcomponents
Last synced: about 2 months ago
JSON representation
Web Components in Easy Mode
- Host: GitHub
- URL: https://github.com/ayoayco/wcb
- Owner: ayoayco
- License: mit
- Created: 2023-09-25T07:20:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-25T18:30:26.000Z (2 months ago)
- Last Synced: 2026-01-26T10:38:03.218Z (2 months ago)
- Topics: webcomponent, webcomponents
- Language: JavaScript
- Homepage: https://WebComponent.io
- Size: 2.29 MB
- Stars: 80
- Watchers: 0
- Forks: 2
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Web Component Base
[](https://www.npmjs.com/package/web-component-base)
[](https://www.npmjs.com/package/web-component-base)
[](https://www.npmjs.com/package/web-component-base)
[](#library-size)
🤷♂️ zero-dependency, 🤏 tiny JS base class for creating reactive [custom elements](https://developer.mozilla.org/en-US/docs/Web/API/Web_Components/Using_custom_elements) easily ✨

When you extend the `WebComponent` class for your component, you only have to define the `template` and `properties`. Any change in any property value will automatically cause just the component UI to render.
The result is a reactive UI on property changes.
## Links
- [Documentation](https://webcomponent.io)
- [Read a blog explaining the reactivity](https://ayos.blog/reactive-custom-elements-with-html-dataset/)
- [View demo on CodePen](https://codepen.io/ayoayco-the-styleful/pen/ZEwoNOz?editors=1010)
## Want to get in touch?
There are many ways to get in touch:
1. Open a [GitHub issue](https://github.com/ayoayco/wcb/issues/new) or [discussion](https://github.com/ayoayco/wcb/discussions)
1. Submit a ticket via [SourceHut todo](https://todo.sr.ht/~ayoayco/wcb)
1. Email me: [ayo@ayco.io](mailto:ayo@ayco.io)
1. Chat on Discord: [Ayo's Projects](https://discord.gg/kkvW7GYNAp)
## Inspirations and thanks
1. [htm](https://github.com/developit/htm) - I use it for the `html` function for tagged templates, and take a lot of inspiration in building the rendering implementation. It is highly likely that I will go for what Preact is doing... but we'll see.
1. [fast](https://github.com/microsoft/fast) - When I found that Microsoft has their own base class I thought it was super cool!
1. [lit](https://github.com/lit/lit) - `lit-html` continues to amaze me and I worked to make `wcb` generic so I (and others) can continue to use it
---
*Just keep building.*
*A project by [Ayo](https://ayo.ayco.io)*