← Back to Docs
  • index.html
  • Clayground
  • Clayground.Lab
  • DockedInstrument
  • Clayground 2026.7
  • DockedInstrument QML Type

    One instrument in an InstrumentDock - a titled panel the reader can put away. More...

    Import Statement: import Clayground.Lab

    Properties

    Detailed Description

    A LabPanel with a dismiss affordance in its corner. Put a face (Gauge, BarFace, ColumnFace, DigitFace) inside it, give it a key the lab's serialization can name it by, and the dock does the rest: dismissing folds the panel and drops a chip into the dock's tray, which offers it back.

    Children stack in a column exactly as in a LabPanel; for a face that must fill the width, bind to <id>.body.width.

    Example usage:

    import Clayground.Lab
    
    DockedInstrument {
        id: levelBox
        key: "level"
        label: LabLang.t("inst.level")
        BarFace { width: levelBox.body.width; scale: levelScale; segments: 20 }
    }

    See also InstrumentDock, InstrumentScale, and LabPanel.

    Property Documentation

    accent : color

    Title colour.


    body : Item [read-only]

    The panel's content area - bind a face's width to body.width.


    content : Item [default]

    Stacked children (the default property).


    dismissable : bool

    Offer the dismiss affordance. Turn it off for an instrument the lab considers essential.


    dock : InstrumentDock [read-only]

    The dock this belongs to.


    key : string

    Stable name the dock and the lab's viewState() use.

    Id-like and language-neutral, for the same reason a probe name is: the caption may be translated under it.


    label : string

    Panel title, already translated.