Skip to content

InspectorSection ​

InspectorSection is a titled group of an inspector, which can fold.

When to use ​

Use it inside an InspectorFrame to group the rows of one tab: the fill, the stroke, the label of the thing shown. Put InspectorRow rows, a FieldList or an AttributeList straight in. Make a group collapsible when it is long or seldom used, so that the ones that matter stay in view. Put a small action on the whole group, such as a reset, in end.

Props ​

PropDefaultDescription
titlerequiredThe name of the group
collapsiblefalseThe group can be closed and opened
opentrueWhether the content shows (bindable)
ontoggleCalled with the new state when the chevron is pressed
valueThe current value, on the right of the head
endSmall buttons on the right of the head (a snippet)
rulefalseDraws a line above the group
flushfalseThe content reaches the edges (a list, a tree)
childrenrequiredThe rows

Contract ​

A SectionHeader: the head is the title as a label, with the actions of end and then the chevron on the right, which overlap it without adding height. A value is shown before them, muted and trimmed to its ink as the value of a Disclosure, whether the group folds or not, and also while it is closed. The chevron is a small ghost button named by the expand or collapse message, with aria-expanded; it points down while the group is open and right while it is closed. Closed, only the head remains, and the next group follows it as it would follow any group. The content has pad-md on its sides and below, its rows gap-sm apart. Sections are stacked with gap 0.

Example ​

InspectorSection

Released under the Apache-2.0 license.