Skip to main content

<Panel>

Category: Visual tag

The Panel tag is one collapsible section inside a <Collapse>. It has a header (value) and holds any block of tags — instructions, controls, even object tags — that the annotator can fold away. Collapse accepts only Panel children; everything else goes inside the panels.

Use it to keep long interfaces tidy: guidelines in a closed panel, the labeling controls in an open one, optional metadata fields folded until needed.

Attributes​

AttributeTypeRequiredDefaultDescription
valuestringnoPanel NHeader text. Accepts a $var from task data. Falls back to Panel 1, Panel 2, … by position when empty.
opentrue,falseno—Whether this panel starts expanded. Overrides the parent Collapse's open for this panel only; when unset, the Collapse value applies. In accordion mode (Collapse accordion="true", the default) only the first open panel actually starts expanded.

Allowed children: View, Header, Labels, Label, Table, Taxonomy, Choices, Choice, Collapse, DateTime, Number, Rating, Ranker, Rectangle, Ellipse, Polygon, KeyPoint, Brush, Bitmask, MagicWand, RectangleLabels, BitmaskLabels, EllipseLabels, PolygonLabels, Vector, VectorLabels, KeyPointLabels, BrushLabels, HyperTextLabels, Text, Audio, Image, HyperText, List, Dialog, TextArea, Pairwise, Style, Relations, Filter, TimeSeries, TimeSeriesLabels, Paragraphs, ParagraphLabels, Pdf, Video, VideoRectangle, TimelineLabels, plus any registered custom tags.

Behavior​

  • A panel's children are rendered even while it is collapsed (forceRender), so hotkeys, <Style> rules, and regions belonging to tags inside a closed panel keep working; folding only hides them.
  • In bulk-annotation mode a panel is shown only if at least one of its children can work without per-task data (e.g. a <Choices>); panels holding only object tags are hidden there.
  • Panel produces no annotation results; its children do.

Examples​

Guidelines closed, controls open​

<View>
<Text name="txt" value="$text"/>
<Collapse accordion="false">
<Panel value="Guidelines">
<Header value="Label every named person, place and organisation."/>
</Panel>
<Panel value="Labels" open="true">
<Labels name="ner" toName="txt">
<Label value="PER"/><Label value="LOC"/><Label value="ORG"/>
</Labels>
</Panel>
</Collapse>
</View>

Header from task data​

<View>
<Collapse>
<Panel value="$speaker_name">
<Audio name="clip" value="$audio"/>
</Panel>
</Collapse>
</View>

Gotchas​

  • Give each panel a distinct value: it doubles as the panel's identity inside the Collapse, so two panels with the same header collide.
  • With the default accordion="true" only one panel is open at a time; set accordion="false" on the Collapse when several panels should start (and stay) open together.
  • A Collapse only accepts Panel children — wrap any other tag in a <Panel> before placing it inside <Collapse>.
  • <Collapse> — the required parent.
  • <View> — plain grouping without folding.
  • <PagedView> — page through blocks instead of folding them.