Wiet

A minimal, dynamic factory for creating web components with zero build steps

Small Footprint Zero Dependencies Pure ES6

Features

Examples

Template Tag

Component using inline <template> tag with light DOM rendering

Template Light DOM Attributes Events
View Example
Template + Shadow DOM

Template with Shadow DOM for complete style encapsulation

Template Shadow DOM Isolated Styles
View Example
External HTML File

Load component HTML from external file with light DOM

External File Light DOM Events
View Example
External + Shadow DOM

External HTML file with Shadow DOM encapsulation

External File Shadow DOM Isolated
View Example
Events & Custom Events

Demonstrates standard and custom event handling

Click Events Custom Events Event Bubbling
View Example
Lifecycle Hooks

Component lifecycle: mounted, unmounted, and changed

Mounted Unmounted Changed
View Example
Slots

Customizable components using default and named slots

Default Slot Named Slots Fallback Content
View Example