Web Components Print

  • webdevelopment, guide, howto, solution, zillionkinghost, hosting, support
  • 0

Reusable elements built into the platform.

WHAT THEY ARE

Custom elements defined by you, usable as ordinary markup.

WHAT THE PIECES ARE

Custom element definitions Encapsulated internal structure and styling Templates

WHAT ENCAPSULATION PROVIDES

Styles inside not affecting the page, and page styles not affecting inside.

WHY THAT MATTERS

Components can be reused across projects without style conflicts.

WHAT THAT ALSO COMPLICATES

Theming, since page styles do not reach in by default.

WHAT TO PROVIDE FOR THEMING

Defined custom properties the consumer may set.

WHAT THEY SUIT

Components shared across projects or teams Components used in pages built with different frameworks Design system elements

WHAT THEY DO NOT REPLACE

Frameworks, for application structure and state.

WHAT TO BE CAREFUL WITH

Accessibility, which must be implemented deliberately Form participation, which requires specific handling Server-side rendering

WHAT TO CHECK

Keyboard operability and announcement, since encapsulation does not provide them.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot