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

    The centred status pill: something is wrong, or something just happened. More...

    Import Statement: import Clayground.Lab
    Inherits:

    Rectangle

    Properties

    Detailed Description

    Top centre, above everything, and normally invisible. Two labs had one - electronics for a short circuit, street-network for gridlock - and both had independently worked out the same three rules, which is why it is here:

    LabBanner {
        active: sim.shorted || sim.overloaded
        alarm: sim.shorted
        blink: sim.shorted
        guard: palette
        text: LabLang.t(sim.shorted ? "banner.short" : "banner.heavy")
    }

    See also HintBar and Narrator.

    Property Documentation

    active : bool

    Show it.


    alarm : bool

    Fault colouring rather than a warning's gold.


    Pulse - reserve it for a live fault.


    fill : color

    Override the severity colour outright.


    guard : Item

    A panel on either side the banner may not grow into.

    Usually the lab's palette or parameter panel. The cap is symmetric, because the banner is centred.


    maxWidth : real

    Hard cap, whatever the guard allows.


    text : string

    The message (already translated).


    topMargin : real

    Distance from the top edge.