key_value: Key/value list

View source: R/widget-display.R

key_valueR Documentation

Key/value list

Description

Shows names and values in two aligned columns, e.g. a summary of a data set.

Usage

key_value(data = list(), id = NULL, classes = NULL, style = NULL)

Arguments

data

A named list or vector.

id

Optional identifier.

classes

Optional classes.

style

A style().

Value

A KeyValue widget with a reactive data field.

Choosing a key/value widget

  • key_value(): a few known values shown in full, such as a summary panel. Not focusable, does not scroll; values are not wrapped.

  • property_grid(): an inspector for many or arbitrary named values. Focusable and scrollable, wraps long values, formats vectors and lists compactly and accepts a format function.

  • record_view(): property_grid() for exactly one record, such as the selected row of a data_table(); accepts a one-row data frame.

Examples

render_widget(key_value(list(Rows = 32, Columns = 11, Source = "mtcars")), 20, 3)

termr documentation built on Oct. 21, 2026, 5:13 p.m.