Skip to content

Attributes

Description

Display a user information with provided user attributes

Attributes

  • tile=attributes
  • title
  • query: Provide an attribute query. e.g current user | given user [..]
  • variant: profile. Provide a variant to display current user details. with configure attribute
  • config
    • profile: true | false.Display user information or not.
  • display:
    • height: height in pixels
    • allowEdit: allow user to edit attributes
    • kind: Provide an attribute kind for e.g attributes
    • profile: true | false
    • classes: classes for an attributes
    • textSize: Indicate the fontsize for the attributes' data's
  • attributes: [Array of object]
    • source: provide a path to display the data
    • title: title for the attribute
    • formatAs: format string
  • profile: object
    • {[key:string]: string}: load data from user objects for e.g provide a following an object keys like :lastInitial, :timezone,:gender, etc... it render the user details if we get user context.

Example

{
  "tile": "attributes",
  "title": "Attributes Title",
  "query": "current user",
  "variant": "profile",
  "config": {
    "profile": true
  },
  "display": {
    "kind": "attributes",
    "allowEdit": true,
    "profile": "large",
    "height": 500,
    "classes": "d-flex"
  },
  "profile": {
    "timezone": ":timezone",
    "dob": ":dob",
    "email": ":email"
  },
  "attributes": [
    {
      "source": "wellness.sleep",
      "title": "Sleep"
    },
    {
      "source": "wellness.stress",
      "title": "Stress"
    }
  ]
}