custom-elements-support
CommunitySeamlessly integrate Web Components in React 19.
Software Engineering#frontend#react#events#interoperability#web components#react 19#properties#custom elements
Authordjankies
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Integrating Web Components (Custom Elements) with React has historically required workarounds, making interoperability difficult and adding boilerplate. React 19 introduces full, native support.
Core Features & Use Cases
- Automatic Property Detection: React 19 automatically determines whether to pass data as a property or an attribute to custom elements.
- Custom Event Support: Handle custom events from Web Components using the standard
on + EventNameconvention. - Simplified Prop Passing: Pass props directly to custom elements without
refworkarounds. - Boolean Attributes: Correctly handles boolean attributes (added/removed as needed).
- Use Case: Integrate a third-party
mwc-buttonWeb Component into a React 19 application, ensuring properties likelabelandiconare passed correctly and itsonClickevent is handled natively.
Quick Start
Integrate the web-counter custom element into src/App.js, passing increment and isDark props and handling the onIncremented event.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: custom-elements-support Download link: https://github.com/djankies/claude-configs/archive/main.zip#custom-elements-support Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.