You can use the mobile features widget for this: https://docs.mendix.com/appstore/widgets/mobile-features#1-2-features
There is an offline-class that is set when the app turns offline. You can set this class on a specific part of a page or lay-out with an offline message.