Fluent Commerce Logo
Docs
Sign In

Adding Header Components to the UI (OMS / STORE)

How-to Guide

Changed on:

5 July 2024

Key Points

  • A step-by-step guide on how to add header components to the manifest.
  • How to specify the position of the components

Steps

Step arrow right iconCustomise your app manifest

This is an app-level setting. When adding a component to the STORE or OMS head bar, a customised manifest is required. The manifest name should follow the format

`fc.mystique.manifest.<web-app-name>`
. Here is an example of how to add a customised OMS manifest:

No alt provided

Step arrow right iconAdd headerDescendants field in manifest

Adding

`headerDescendants`
at the root level in the manifest requires the value to be a JSON object. To differentiate between mobile and desktop, both fields are necessary. Multiple components can be added within the
`desktop`
and
`mobile`
fields. Here is an example of the
`headerDescendants`
configuration:

No alt provided
1"headerComponents": {
2 "desktop": [ ], 
3 "mobile": [ ] 
4}

Language: json

Name: headerDescendants code snippet

Description:

headerDescendants code snippet

There is no limit to the number of components that can be added, so screen compatibility should be taken into account. Adding too much components may exceed the screen compatibility.

Step arrow right iconSpecify components position

Component alignment can be specified using the

`align`
fields. The order of the components is not relevant. Alignment options include 'left', 'right', 'center', or 'centre'. The
`align`
field is not mandatory; if it is missing or contains an invalid option, the default alignment will be 'left'.

No alt provided


1 "headerComponents": {
2        "desktop": [
3            {
4                "align": "left",
5                "descendant": {}
6            }
7        ],
8        "mobile": [
9            {
10                "align": "center",
11                "descendant": {}
12                }
13            }
14        ]
15    },

Language: json

Name: headerDescendants code with align snippet

Description:

headerDescendants code with align snippet

Step arrow right iconAdd component details

Add component details in the

`descendant`
field. Below is a text component example:

No alt provided
1 "headerComponents": {
2        "desktop": [
3            {
4                "align": "left",
5                "descendant": {
6                    "component": "fc.mystique.collapsible.text",
7                    "props": {
8                        "text": "textDesktop",
9                        "charCutoff": 100
10                    }
11                }
12            }
13        ],
14        "mobile": [
15            {
16                "align": "center",
17                "descendant": {
18                    "component": "fc.mystique.collapsible.text",
19                    "props": {
20                        "text": "textMobile",
21                        "charCutoff": 100
22                    }
23                }
24            }
25        ]
26    },

Language: json

Name: headerDescendants code with descendant snippet

Description:

headerDescendants code with descendant snippet

Step arrow right iconExample view

The result of adding a text component will look like this:

No alt provided

On mobile devices, the head bar will look like: 

No alt provided

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo