Skip to content

InspectorFrame ​

InspectorFrame is the panel of the thing selected: its name, changed where it stands, the tabs of its views and the sections that edit it.

When to use ​

Use it for the panel that shows one selected thing and lets it be changed, beside the stage. The application decides what the thing is: it passes the name, the tabs and, as children, the InspectorSection groups of the current tab, filled with InspectorRow rows, a FieldList or an AttributeList. When several things are selected, use SelectionSummary instead.

Pass ontitle to let the name be changed. The frame shows title; when a name is committed, ontitle receives it trimmed and the application updates title, or the name goes back to it. So the application decides what an empty name means: keep the old one, or put a default in its place.

Props ​

PropDefaultDescription
titlerequiredThe name of the thing shown
ontitleCalled with the name committed; without it, no editing
titleEditabletruefalse shows the name as a title only
placeholderaddName messageThe action shown while the name is empty
subtitleA second line under the name
iconAn icon before the name
tabs[]The views, { id, label }[]
currentthe first tabThe id of the current tab (bindable)
onselectCalled with the id of the tab that is opened
headIcon buttons in the head, before the close button (a snippet)
underHeadA band under the head, above the tabs (a snippet)
endThe foot, a Footer with the actions (a snippet)
oncloseShows a close button in the head
sidepanelThe width, as Panel's side
childrenrequiredThe sections of the current tab

Contract ​

A Panel whose head is a Toolbar: the icon, the name, the controls of head and the close button, in that order. The name is an InlineEdit at the size of h2, named by the rename message (Enter commits, Escape restores), or, not editable, a title on one line with an ellipsis. With a subtitle, the head grows to hold it as a muted caption under the name. With tabs, a second Toolbar under the head holds the Tabs, and its line is the one line of the head; without, the head draws the line. underHead is placed right under the head and above the tabs, with no distance of its own: a band of the application, such as a palette in a Block, that keeps its place while the content scrolls. The content is stacked with gap 0 and scrolls; the foot keeps its height. The panel is a region named by the name.

Example ​

InspectorFrame

Released under the Apache-2.0 license.