Skip to content

Key-value entry

KeyValueEntry turns a mapping into an or-key-value table — the right fit when a record stores a dict of sparse attributes (meta blobs, feature flags, settings maps) and you want operators to scan keys beside values without opening a JSON blob.

The entry label still stacks above the table; customize the inner column headers with .key_label / .value_label so the table reads in domain language (Property / Content) instead of generic Key / Value.

app/orbit/resources/post_resource.py
from almasix.orbit.infolists import KeyValueEntry
KeyValueEntry.make("meta").label("Meta")

Orbit Key-value entry basic (light)

Orbit Key-value entry basic (dark)

.key_label(...) and .value_label(...) rename the header cells (defaults Key / Value).

app/orbit/resources/post_resource.py
KeyValueEntry.make("meta")
.label("Meta")
.key_label("Property")
.value_label("Content")

Orbit Key-value entry labels (light)

Orbit Key-value entry labels (dark)

An empty dict still renders the table chrome with headers so the slot is obvious on a sparse record. Pair with .placeholder(...) on the shared entry when you would rather show a sentence than an empty table.

app/orbit/resources/post_resource.py
KeyValueEntry.make("meta").label("Meta").placeholder("No metadata")

Orbit Key-value entry empty (light)

Orbit Key-value entry empty (dark)

Method Notes
.key_label Header for the key column
.value_label Header for the value column
Shared chrome Label, helper, hint — see overview