Appearance
Function: keyValue()
ts
function keyValue(props: UiKeyValueProps): Element;Defined in: src/UI/blocks/keyValue.tsx:48
Key-value component for displaying labeled data with optional icons and extra information.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | UiKeyValueProps | Configuration object |
Returns
Element
Examples
Basic usage with static content
keyValue({
label: 'Username',
value: 'john.doe'
});Usage with dynamic content from params with data and value
keyValue({
label: 'Current User',
value: ({data}) => `${data.user.firstName} ${data.user.lastName}`,
extra: ({data}) => `Last login: ${data.user.lastLogin}`
});Usage with icon and horizontal layout
keyValue({
icon: 'user',
label: 'Account Status',
value: 'Active',
layout: 'horizontal'
});