// Skill Bubble Web Component class SkillBubble extends HTMLElement { constructor() { super(); this.attachShadow({ mode: 'open' }); } connectedCallback() { const skill = this.getAttribute('skill') || 'JavaScript'; const level = this.getAttribute('level') || '80'; const icon = this.getAttribute('icon') || 'code'; this.shadowRoot.innerHTML = `
${skill}
${level}%
`; // Animate progress bar after a delay setTimeout(() => { const progressFill = this.shadowRoot.querySelector('.progress-fill'); if (progressFill) { progressFill.style.width = `${level}%`; } }, 500); } } // Register the custom element customElements.define('skill-bubble', SkillBubble); // Usage example: // // //