Chapter 12

Web Components


Recipe 12.1
Creating a Component to Show Today's Date

Build a web component that shows today's date.

Recipe 12.2
Creating a Date Formatter Component

Build a web component that is given a date and formats it.

Recipe 12.3
Creating a Feedback Component

Build a web component that lets a user provide a feedback rating.

Recipe 12.4
Creating a Profile Card Component

Build a profile card component that uses slots.

Recipe 12.5
Creating a Lazy Loading Image Component

Build a custom image component that is lazily loaded when it enters the viewport.

Recipe 12.6
Creating a Disclosure Component

Build a component that toggles visibility of child content.

Recipe 12.7
Creating a Styled Button Component

Build a custom button component with different style options.

Web Browser API Cookbook
Joe Attardi