Descriptions
Display multiple read-only fields in groups. Commonly used to display a detailed set of data.
Block
Item One | Item Two | Item Three |
Item Four |
Block Setup
id: block_id
type: Descriptions
properties:
itemOptions: []
items:
- label: Item One
value: null
span: null
style: null
- label: Item Two
value: null
span: null
style: null
- label: Item Three
value: null
span: null
style: null
- label: Item Four
value: null
span: 3
style: null
Settings
Examples
Object data example
Location | South Africa | Temperature | 22 | Date | 2021-02-02T00:00:00.000Z |
---|
id: object_example
type: Descriptions
properties:
bordered: true
items:
Location: South Africa
Temperature: 22
Date: '2021-02-02T00:00:00.000Z'
Descriptions JSON Schema Definition
type: object
properties:
properties:
additionalProperties: false
properties:
bordered:
default: false
description: Render items in a table.
type: boolean
colon:
default: true
description: Include a colon in item labels.
type: boolean
column:
default: 3
oneOf:
- description: The number of description items in a row.
type: number
- properties:
lg:
description: The number of description items in a row for 'lg' media size.
type: integer
md:
description: The number of description items in a row for 'md' media size.
type: integer
sm:
description: The number of description items in a row for 'sm' media size.
type: integer
xl:
description: The number of description items in a row for 'xl' media size.
type: integer
xs:
description: The number of description items in a row for 'xs' media size.
type: integer
type: object
itemOptions:
items:
properties:
key:
description: Item key to which these settings should apply.
type: string
span:
description: >-
Item span for this key. Can also be a function that receives item
and index.
type:
- number
- object
style:
description: >-
Item css style for this key. Can also be a function that receives
item and index.
type: object
transformLabel:
description: >-
Function to transform item key or label. Function receives
arguments label, item and index.
type: object
transformValue:
description: >-
Function to transform item value. Function receives arguments
value, item and index.
type: object
required:
- key
type: object
type: array
items:
oneOf:
- description: List of items to display
items:
properties:
label:
description: Item label - supports html.
type: string
span:
description: Number of columns for this item to span.
type: integer
style:
description: Css style object to applied to item.
type: object
value:
oneOf:
- description: Value of item - supports html.
type: string
- description: Value of item - supports html.
type: number
required:
- label
type: object
type: array
- description: Object of key value pairs to display
type: object
layout:
default: horizontal
description: Put values next to or below their labels.
enum:
- horizontal
- vertical
type: string
size:
default: default
description: Size of the block.
enum:
- default
- small
type: string
title:
description: The title of the description block, placed at the top - supports html.
type: string
type: object