Data Display

Inspector

Group of quiet property rows for a detail page: a label, a value and an affordance, with each editable row becoming an editor on activation.

import { Inspector } from '@lostgradient/cinder';
propertiesdetailinspector
01

Overview

Reference usage

Inspector groups the properties of one record as quiet rows, for a detail page. Each InspectorRow is a muted label in a fixed 140px column, the value in the default text colour, and a trailing affordance; an editable row becomes an editor when it is activated, and a read-only row draws no affordance, so the two never look the same. When the inspector's own box is 700px or wider the group is one tinted surface with separators inset to the text. Narrower, the group reads as a grouped list on the raised surface a GroupedList uses, and below 23rem each label stacks above its value. Every row is at least 44px tall.

Usage

svelte
<script lang="ts">
  import { Inspector, InspectorRow } from '@lostgradient/cinder';

  let status = $state('open');
  let title = $state('Spring menu launch');
</script>

<Inspector header="Details">
  <InspectorRow
    label="Title"
    kind="text"
    current={title}
    onCommit={(next) => (title = String(next))}
  >
    {#snippet value()}{title}{/snippet}
  </InspectorRow>
  <InspectorRow
    label="Status"
    kind="select"
    current={status}
    options={[
      { value: 'open', label: 'Open' },
      { value: 'closed', label: 'Closed' },
    ]}
    onCommit={(next) => (status = String(next))}
  >
    {#snippet value()}{status === 'open' ? 'Open' : 'Closed'}{/snippet}
  </InspectorRow>
  <InspectorRow label="Created">
    {#snippet value()}Nov 10, 2026{/snippet}
  </InspectorRow>
</Inspector>

Right rail and phone layout

The inspector is its own inline-size container, so it follows its own width, not the viewport's. Below 700px of that width the group sits on the raised surface of a grouped list, and below 23rem (368px), too narrow for the 140px label and a readable value beside it, the label of each row stacks above its value, as a DescriptionList term does. So the same markup is the properties section of a phone page, a 20rem right rail reads the same way, and a wider rail keeps each value on its label's line. Give it a header to name the group.

Live preview

Editable and read-only rows

Details

Title
Status
Due
Notify
Created
Nov 10, 2026

02

When to use

Use when
  • Showing the properties of one record on a detail page: one tinted rail when its box is wide, a grouped section when narrow.
  • Letting a person change a property in place instead of through a stack of always-editable fields.
Avoid when
  • Showing read-only facts with no editing at all — use description-list.
  • Editing many fields at once and saving them together — use a form with form-field.
03

Examples

Editable and read-only rows

Each editable row shows a trailing affordance and becomes a text, select, date or toggle editor when activated; the read-only row has none.

04

Props

Props for inspector
Name
Type
Default
Description
header text A header drawn above the group, outside its surface, in small muted text. It also names the group.
children snippet The rows: InspectorRow elements.