Home
Softono

Component Elements

Open source MIT TypeScript
96
Stars
9
Forks
3
Issues
2
Watchers
1 year
Last Commit

 About Component Elements

Create a custom element from any component with these tiny functions (2KB GZipped, ~1KB Brotli). Preact and React currently supported

Platforms

Web Self-hosted

Languages

TypeScript

Links

Need Help Installing Component Elements?

We provide expert installation service for this software. Our team will install, configure, and secure Component Elements on your server. plans start at just $30.

Component Elements

View on GitHub

component-elements

These packages provide the ability to use an HTML custom element as the root for your components. In addition, it allows the use of async code resolution if your custom element isn't immediately used, which is a great strategy for reducing code weight.

Getting Started

Depending on your component library, visit the relevant package below and follow setup instructions:

Library Package
Preact preactement
React reactement
Vue supported natively!

Acknowledgement

This function takes heavy inspiration from the excellent preact-custom-element. That library served as a starting point for this package, and all of the Preact guys deserve a massive dose of gratitude. I had slightly different needs, so decided to build this as part solution, part learning excersize.