Fluent Commerce Logo
Docs

UX Configuration - Common Concepts

Essential knowledge

Intended Audience:

Technical User

Author:

Fluent Commerce

Changed on:

24 Feb 2026

Overview

Some common types and conventions are used across many component definitions. These items are not directly configurable in the manifest but will often be referenced in other component definitions that use them.

Key points

  • The Mystique manifest configures icons, cards, and template strings. Icons come from React Icons. 
  • Cards have common fields, and template strings allow dynamic values. Dynamic attributes (standard, image, component) offer flexibility based on conditions. 
  • A selection of helper functions are also available to control and transform these values as required, for example, number, logic, i18n, array, date, and string functions.
  • Additional options like TextOptions and ImageOptions provide styling choices.

Icons

There are many places where icons can be configured in the Mystique manifest, whether to represent the app itself, different routes, or within component configurations.In most cases, the list of available icons comes from the React Icons library - specifically the Material Design and Font Awesome packages.

Card

Many content-centric components are embedded in a card and will, therefore, share some common fields.
NameTypeRequiredDescription
`title`stringnoTitle text of the card
`highlight`MystiqueThemeColour / string (hex value)noShow a colored highlight above the card to denote status in cases like dashboard cards.
`width`"quarter" / "third" / "half" / "two-thirds" / "full" / number (1-12)noDefine the width of this card on a 12-column grid. You can use the named widths for readability or numbers directly.

On mobile devices, all widths will automatically change to 12 for the best responsive experience.

The default is "full" and will take up the full width of the containing component.

Template Strings

Accessing entity attributes by name

In GraphQL, any entity attributes are returned as an array. This can make it difficult to configure a component to show a specific attribute.To help with this, attribute arrays have a `byName` property that allows specific attributes to be directly referenced in template strings.For example, if an Order has a custom attribute `vipStatus`, you can add this attribute to a card or list with the following syntax:`"{{order.attributes.byName.vipStatus}}"`

Plugin-specific Template Strings

Some additional templates are available only when certain plugins are loaded.
NameBodyDescriptionExamplesPlugin
Array functions



`arrayFieldSum`body:

0: array of objects

1: JSONPath from the object root to the field to be summed.
Total up values from within an array of objects. Supports summation of elements with zero value.datasource:
`[{price: 1},{price: 2},{price: 3},]`
`"{{arraySum items 'price'}}" // 6`
OMS
`getMaxValue`array of objectsGet the max value from an array of objectsdatasource: No alt provided`{{getMaxValue` `node.updatedOn}} // '2023-12-12T00:00:00.000Z'`Inventory
`getTotalActiveFeeds`objectGet total active feeds from a query on the Feeds Dashboard`{{getTotalActiveFeeds inventoryFeeds.edges}}`Inventory
Date functions



`timeAgo`date object Convert a date object or date-formatted string into a relative format:
  • less than 1 second ago - round to seconds and display 0 sec (less 499 ms) or 1 sec (500 ms or more);
  • less than 1 minute ago - “XX sec” (note: 59 sec 499 ms is rounded to 59 sec; 59 sec 500 ms is rounded to 1 min)
  • less than 1 hour ago - “XX min” (note: 5 min 29 sec is rounded to 5 min; 5 min 30 sec is rounded to 6 min)
  • less or equals 23 hours 59 min 59 sec ago  - “> XX hr” (note: 1 hr 0 min 0 sec is converted to “> 1 hr”)
  • more than 23 hours 59 min 59 sec ago - “> 1 day”
`{{timeAgo node.updatedOn}}`Inventory
`convertMsToDate`numberConvert milliseconds to date.`{{convertMsToDate 1691054160}} // '1970-01-20T13:44:14.160Z'`Inventory
`convertISODateToMS`stringConvert an ISO-formatted date string to milliseconds.`{{convertISODateToMS '2023-12-12T00:00:00.000Z'}} // 1702339200000`Inventory
Number functions



`round`numberRound a number `{{round 5.4}} // 5`Inventory
String functions



`compactNumberFormat`stringConvert a number to a compact format`{{compactNumberFormat 15000}} // 15k`Inventory

Using Contextual Inheritance in Nested Components

Contextual inheritance makes it easy to access and reuse shared data across multiple components. It defines a common structure that holds the current user, their active retailer and location, and other relevant settings. This shared context is automatically available in both visible components (like lists or cards) and invisible parts, like query variables.Template Strings like ``{{activeContext.id}}`` can be used anywhere inside component configuration or query definitions. These expressions dynamically resolve to the correct context values without requiring manual input or duplication. It ensures consistency across the page and keeps the logic simple and centralized.Instead of configuring each component separately, the same data can be passed down and used in various ways — for filtering, display, or behavior toggles.Here’s an example of the shared context structure:

Dynamic Attribute

Dynamic Attribute is a common convention used when defining key/value type information in the manifest, such as card attributes or table columns.The "value" and "link" fields are both Template Strings (see above), which is how dynamic values can be defined. For example, a table column might be defined as:

Standard (or Text) Attribute

NameTypeRequiredDescription
`type``"standard"` (or not present)noChoose whether the value should be displayed as text or used to render an image.

The default is "standard".
`label``string`yesString key of the key/value pair. Used as text labels in `AttributesCard` component and column headers in the List component. Not actually used by DynamicValue.
`value``string` (with templates)yesThe templatised string is to be transformed into the output value.

Has access to DynamicValue context (e.g., GraphQL response data) and any available template helpers (e.g., i18n, date formatters, etc.).
`link``string` (with templates)noIf present, render the text as a link to the location defined in the "link" value. This also has access to DynamicValue context (e.g., GraphQL response data) and any available template helpers (e.g., i18n, date formatters, etc.).
`options``TextOptions`noType-specific configurations for the Dynamic Attribute
`condition``string` (with templates)noIf `true`, render the text a link to the location defined in the "link" value. Otherwise, render defaultValue.
TextOptions
In text-based attributes, a set of optional styles can be applied.Each style option has a `matches` condition, and for each instance of an attribute, the style options are evaluated in order until the first match is found, at which point that style is applied.
NameTypeRequiredDescription
`styles``TextStyle[]`noSet of styles to apply to this text attribute.
TextStyleOption
NameTypeRequiredDescription
`value``string`noValue to compare matches to. Default is the rendered value of the overall attribute itself.
`matches``string[]`noIf any of these match the value, apply this style. If empty, treat this as a `default` style (and apply to all).
`icon``IconStyle`noIcon and coloring to apply to this attribute.
`text``TextStyle`noText coloring to apply to this attribute.
IconStyle
NameTypeRequiredDescription
`name``loading`/`string` (icon name)yesName of the icon to show with this text attribute.

To show a loading spinner, use `loading`; otherwise, this should be a reference to a supported icon (see Icons above).
`colour``string`noOptionally apply a color to the icon.

Named theme colors (e.g. `primary` or `secondary`) are recommended, but direct CSS hex values (e.g., `#00FF00`) are also supported.`
TextStyle
NameTypeRequiredDescription
`colour``string`noOptionally apply a color to the text.

Named theme colors (e.g. `primary` or `secondary`) are recommended, but direct CSS hex values (e.g., `#00FF00`) are also supported.`
Sample usage
The following attribute is used to embed a link into a component.

Image Attribute

NameTypeRequiredDescription
`type``"image"`yesChoose whether the value should be displayed as text or used to render an image.
`label``string`yesString key of the key/value pair. Used as text labels in `AttributesCard` component and column headers in the List component. Not actually used by DynamicValue.
`value``string` (with templates)yesThe templatised string is to be used as the URL for the image.

Has access to DynamicValue context (e.g., GraphQL response data) and any available template helpers (e.g., i18n, date formatters, etc).
`link``string` (with templates)noIf present, render the image as a link to the location defined in the "link" value. This also has access to DynamicValue context (e.g. GraphQL response data) and any template helpers that are available (e.g. i18n, date formatters, etc).
`options``ImageOptions`noType-specific configurations for the Dynamic Attribute
`condition``string` (with templates)noIf it returns `true`, render an image. Otherwise, render defaultValue.

The Condition field can stop an image from displaying if it contains no `src`.
ImageOptions
NameTypeRequiredDescription
`height``number`noHeight of the image (width will auto-scale)
`width``number`noWidth of the image (height will auto-scale)
`alt``string`noAlt text of the image
`noModal``boolean`noTrue to prevent the default modal on click of an image
Sample Usage
Example 1.In the following example:
  • the first option would be applied when the wave is in `CREATED` or `PICK` states
  • the second when the wave has a custom attribute of the value "customValue" but is not in `CREATED` or `PICK` states (as that would have stopped at the first style)
  • the third, in any other case
Example 2.The following attribute is used to embed an image into a component.`
`

Component Attribute

The component-type attribute allows you to embed components inside of other components that accept DynamicAttributes.Please be aware that not all components will work particularly well in all positions!
NameTypeRequiredDescription
`type``"component"`yesChoose whether the value should be displayed as text or used to render an image.
`label``string`yesString key of the key/value pair. Used as text labels in `AttributesCard` component and column headers in the List component. Not actually used by DynamicValue.
`value``string`noNot used in `component` attributes.
`link``string`noNot used in `component` attributes.
`options``MystiqueComponentInstance`noComponent props, as you would define them anywhere else in the manifest.
`condition``string` (with templates)noIf it returns `true`, render an image. Otherwise, render defaultValue.

The Condition field can stop a component from displaying if it contains no data.

Sample usage

The following attribute is used to embed the print button component into a table column.