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. At desktop width the group is a right rail on one tinted surface with separators inset to the text. Below 700px each label stacks above its value and the group reads as a grouped list on the raised surface a GroupedList uses. 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

Put the inspector in a narrow column beside the page content for a right rail. Below 700px the label of each row stacks above its value and the group sits on the raised surface of a grouped list, so the same markup is the properties section of a phone page. 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 as a right rail on a desktop and a grouped section on a phone.
  • 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.