When sending a web push message we have the ability to customise the notification that is popped up to the user. We can set things like the title, body, icon, buttons and how long the notification is displayed for. This Javascript tutorial looks at how to go about this customisation after setting up a simply test environment. So we create a service worker, register it and allow notifications to be sent. Then within the service worker we create the required event handlers to display and customise the UI of the notification. The main object used here is the 'options' object which we setup and pass to the showNotification call.
0:00 Setup and Configuration
4.05 Customising the Notification
6:40 Setting Title
7:25 Setting Body
9:00 Adding an Icon
10:20 Adding Interactivity
12:00 Add Buttons
14:20 Persisting Notification
Some good references here:
https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification
https://developers.google.com/web/updates/2016/01/notification-actions
https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications