Skip to content
P

preact-custom-element

Generate/register a custom element from a preact component

by preactjsOpen source

#1308in UI Libraries
0In stores

Description

preact-custom-element is a small library that wraps a Preact component as a custom element, which is the browser's standard way to define a…

Highlights

  • Wraps a Preact component as a custom element
  • Observed attributes passed to the component
  • Slots passed through as props
  • Static properties on the generated element

Ratings & Reviews

No ratings yet

Be the first to rate preact-custom-element.

People also visit

W

@webcomponents/custom-elements

Custom Elements polyfill by Polymer team

UI Libraries
Launch
C

custom-element-vs-code-integration

Tools for integrating web components/custom elements into VS Code

UI Libraries
Launch
P

Preact WWW

Preact documentation website

Productivity
Launch
H

How to use Web Components in React

A tutorial on how to use Web Components in React

UI Libraries
Launch
V

@vscode-elements/elements

Web components for creating Visual Studio Code extensions

UI Libraries
Launch
L

Lume Element

Write custom elements with reactivity and templating

UI Libraries
Launch

preact-custom-element FAQ

What is preact-custom-element?

A library that turns a Preact component into a custom element, a reusable HTML tag registered in the browser.

Who is it for?

Developers who use Preact and want to publish a component as a custom element that other pages can use.

How are attributes handled?

The README has a section on observed attributes that explains how HTML attributes are passed to the component.

Is it open source?

Yes. The code is public on GitHub in the preactjs organization.

What are the best preact-custom-element alternatives?

Popular alternatives to preact-custom-element include @webcomponents/custom-elements, custom-element-vs-code-integration and How to use Web Components in React. See all preact-custom-element alternatives

Developer Stuff

Badges