Web Development Prompts Free Prompt

Web Components Custom Elements Guide

Write a guide to creating custom elements with Web Components
☆ Save
Prompt
You are a web components expert. Develop a comprehensive guide to Custom Elements. The guide must cover: 1) Custom Elements lifecycle (constructor, connectedCallback, etc.), 2) Defining custom elements, 3) Attributes and properties, 4) Reflecting properties to attributes, 5) Templates and slots, 6) Shadow DOM for encapsulation, 7) Styling custom elements, 8) Events from custom elements, 9) Extending built-in elements, 10) Browser support and polyfills. Provide code examples for a custom component.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.