I am looking into options for customizing the Out-of-the-Box (OOTB) session timeout warning toast message.
Specifically, I’d like to know if there is an easy, supported way to update the UI of this toast. Our goal is to add additional elements, such as custom buttons, to the message.
Could you please advise if this is possible OOTB, or if a custom implementation is required?
One of the ways to change the session timeout warning message is to use ‘Language Override’ OOTB feature. (Control Panel → Configuration → Language Override)
While this doesn’t fully meet your needs for an OOTB method, but might be useful for others. You can customize the toast messages using a Client Extension. In the example attached I’ve used the CSS Client Extension sample, and updated the global.css to customize the toast design.
The built-in toast type values that are supported by Liferay.Util.openToast() are:
success
danger
warning
info <— this is the one to customize for the session timeout.
Then, as @Pooja_Bhambani mentioned, you can use the Language Override workaround to customize the session timeout warning message.