8. Hello web components

hero

Requirements

  • Develop custom element. Make it as simple or as complex as you like.
  • Isolate your element by using a shadow DOM. No styles should be leaking out of your web component.
  • Write it in plain JS. (Don’t use 3th-party libraries like Lit)
  • ⭐ Use at least 1 CSS custom variable to style something inside your web component from outside of the shadow DOM

Design preview

Personal preference

Resources

Learn more

Discussion topics

  • Component encapsulation
  • Style leaking and inheritance with shadow DOM
  • Customizing the component from the host document when using custom properties and “part”
  • Life-cycle events
  • Attributes vs Properties
  • The slot element
  • Template literals interpolation

👑 Winner

TBA

🎖️ MVP

TBA