Notification Icon

On this page:

About the Notification Icon

Notification Icon is a component that can be placed anywhere in the Document Object Model (DOM). This component syncs to your AutoQL data and displays a badge when it detects new notifications. It would typically be placed in the main header menu within your application.

Setting Up the Notification Icon

The following sections in this document contain detailed information about how to customize the properties of this widget.


Option NameData TypeDefault Value
authentication (required)Object{}
onNewNotificationFunction(notification) => {}
onErrorCallbackFunction(error) => {}

overflowCount: The maximum number of new notifications to display in the red badge before appending a +.

useDot: Set to false if you do not want numbers to show in the red badge. Instead, it will show a small red dot if there are new notifications.

clearCountOnClick: Whether or not to clear the number in the badge when the notification icon is clicked. By default this is set to true.

onNewNotification(notification): A callback for when a new notification comes in.

onErrorCallback(error): A callback for when an error occurs in the component.

authentication Option

KeyValue TypeDescription
tokenStringYour valid JWT encrypted with your user ID and customer ID. For more information on how to create this token, please see: Create JSON Web Tokens (JWT)
apiKeyStringYour API key. For more information on how to obtain this, please see: Manage API Keys
domainStringThe base URL for your API.

themeConfig Option

KeyValue TypeDefault
themeString: 'light' || 'dark''light'
accentColorStringlight theme: '#28a8e0', dark theme: '#525252'
chartColorsArray['#26A7E9', '#A5CD39', '#DD6A6A', '#FFA700', '#00C1B2']

theme: Currently there are two options: light theme and dark theme. In addition to changing the overall theme, you can also change the accent color using the accentColor option.

accentColor: Primary accent color used for buttons, link, or hover effects. Note that the visualization (table and chart) colors will not be affected here.

fontFamily: Customize the font family to the provided font wherever possible. Accepts any CSS font family that is available, and if none is provided, will default to Sans-Serif.

chartColors: Array of color options for the chart visualization themes, starting with the most primary. You can pass any valid CSS color format in here, however it is recommended that the color is opaque (ex. "#26A7E9", "rgb(111, 227, 142)", or "red"). Charts will always apply the colors in order from first to last. If the visualization requires more colors than provided, all colors will be used and then repeated in order.