This is Not A Drill! is a service with which you can popup important service messages to grab your users' attention in-app.
Common use cases are :
- website outages / problems
- scheduled maintenance
- important updates to your user flow
- changes to your service offerings
- legal changes/updates, e.g. regarding privacy policy, SLA, or TOS
This demo shows how you can implement This Is Not A Drill! (TINAD
) SDK in a node
application.
- Install the SDK via:
npm i @this-is-not-a-drill/vanillajs-sdk
or
yarn add @this-is-not-a-drill/vanillajs-sdk
- Then, in your application, import and configure
TINAD
:
import {
configureTinad,
generateDefaultConfiguration,
getCurrentConfiguration,
SDKConfiguration
} from '@this-is-not-a-drill/vanillajs-sdk';
// Generate some sensible default TINAD configuration values.
const newConfig = generateDefaultConfiguration();
// See 'environment.ts' in this directory.
newConfig.api.endpoint = environment.API_ENDPOINT;
// see 'environment.ts' in this directory.
newConfig.api.key = environment.API_KEY;
// Set this to whatever notification display mode you prefer:
// toast, modal, banner, inline.
newConfig.api.displayMode = 'toast';
// Lastly, tell TINAD to start (or restart) with your configuration.
configureTinad(newConfig);
After this, you can always call configureTinad({<new configuration>})
to make TINAD
operate in a new way (e.g. inline
notifications on certain pages).
You can read more in our documentation.
Looking for a tighter integration with React? Take a look at our React SDK.