Skip to main content

Key Value

The Key Value component provides an intuitive way for developers to visualize an object's key and value pairs in a clear and organized manner.

This component is designed to make it easier to display and manage data structures by showing each key alongside its corresponding value.

Key Value Properties

Component Properties

PropertyDescription
Content
Source dataThe object to be displayed within the component
Key value pairsKeys corresponding to the values within an object.
Appearance
Key positionPosition the keys above or to the side of the value.
Key styleChanges the style (font, size, color, etc.) of the keys. Configure styles in the Typography settings
Value styleChanges the style (font, size, color, etc.) of the values. Configure styles in the Typography settings
Wrap keyIf enabled, the key text will wrap.
Wrap valueIf enabled, the value text will wrap.
BackgroundChanges the color of the background.
BorderControls the border of the component.
Border radiusControls the border radius of the component.
DividerDisplay dividers between key value pairs.
Layout
PaddingControls padding.
SpacingControl spacing between each key-value pair.
WidthControls the width of the component.
HeightControls the height of the button.
Key widthControl the width of the key container. Can specify a fixed width in pixels or a fluid width as a percentage of the component's width
Value alignmentPosition the value to the right or left
VisibleControls whether the button is visible or not
Collapse when invisibleWhen enabled, other components shift up to occupy the space left by this component. If disabled, the component is hidden but leaves blank space. Has no effect when viewing in edit mode

Reference Properties

Properties can be accessed from other frontend components and backend APIs by adding the name of the Key Value component, and dot referencing the property. For a Key Value component named KeyValue1:

PropertyDescription
KeyValue1.isVisibleReturns whether the component is visible
KeyValue1.dataReturns the data structure that includes the original data and any custom Key Value pairs not present in the source data
KeyValue1.sourceDataReturns the original data that populates the Key Value component.

Example Usage:

Display table row data within slide out

  1. Set your table component's onRowSelected event handler to open/close a slideout.
  2. Select an existing slideout or create a new one.
  3. Select a row on your table to open the slideout.
  4. Add the new Key-Value component anywhere you like on the slideout.
  5. Set the component's source data to <TableName>.selectedRow.
    Example of a link component.