Chapter 13

UI Elements


Recipe 13.1
Creating an Alert Dialog

Build a pop-up alert dialog.

Recipe 13.2
Creating a Confirmation Dialog

Build a pop-up confirmation dialog.

Recipe 13.3
Creating a Confirmation Dialog Web Component

Encapsulate the dialog logic in a custom element.

Recipe 13.4
Using a Disclosure Element

Use the details component to show and hide some content.

Recipe 13.5
Showing a Popover

Use the popover attribute to show content in a popover.

Recipe 13.6
Manually Controlling a Popover

Show popover contact programmatically using JavaScript.

Recipe 13.7
Positioning a Popover Relative to an Element

Position a popover relative to another element, such as its trigger.

Recipe 13.8
Showing a Tooltip

Use a popover as a tooltip.

Recipe 13.9
Showing a Notification

Show native operating system notifications.

Web Browser API Cookbook
Joe Attardi