Skip to main content

Rewards & KPIs grid template

Description

The grid template renders lists of rewards and KPIs in the Profile Widget. It's used across multiple areas:

  • KPIs
  • Missions, Levels and Achievements
  • Mission Details
  • Custom Tabs

Control classes

ClassDescriptionRequired
mambo-ctrl-cardWrapper for each card in the gridYes
mambo-ctrl-closeRemoves the mission rewards container when clicked (only when viewing mission details)No
mambo-ctrl-flipApplies a horizontal rotating transition to the parent card when clicked. Requires mambo-card-front and mambo-card-back classesNo
mambo-ctrl-progressWrapper for progress-related controls that can create expanding effectsNo
mambo-ctrl-progress-headerWhen clicked, expands the progress detailsNo
mambo-ctrl-progress-detailsContains detailed progress information shown when header is clickedNo
mambo-ctrl-expired-headerClickable area that displays expiration dates for rewards (used on card back)No
mambo-ctrl-expired-detailsContainer for reward expiration datesNo
mambo-ctrl-dateInput element for the date picker used to filter KPIs by calendar dateNo
mambo-ctrl-period-itemElement that provides period value for KPI filtering via data-period attribute (e.g., <div data-period="monthly">). Valid periods: daily, weekly, monthly, quarterly, yearlyNo

Template data

VariableDescriptionType
gridInformation about the grid displaying the rewards listObject
dataArray of missions, levels or achievements to display. See Users Reward APIs documentation for object detailsArray
isLoadingFlag indicating whether data is still loading. The template re-renders when loading completesBoolean
currentIdxFor levels: index of user's current level. For linear mission rewards: index of next reward to unlockInteger
isDetailsTrue when displaying mission detailsBoolean

Implementation example

This example shows a basic grid template with loading state handling:

JavaScript

Customisation options

Consider these enhancements:

  • Implementing card flipping animations for reward details
  • Adding progress bars for missions and levels
  • Creating filter controls for different reward types
  • Adding sorting options for rewards
  • Implementing responsive grid layouts