Skip to content

UI.Collapsing

Name - Description Default Type
<input> The value that will be passed to the Contents shards of the collapsing header. Any
<output> The output of this shard will be its input. Any
Heading The heading text or widgets for this collapsing header. None StringShard[Shard]
Contents The UI contents. None Shard[Shard]
DefaultOpen Whether the collapsing header is opened by default. false Bool

A header which can be collapsed/expanded, revealing a contained UI region.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    :Contents
    (UI.Collapsing
     :Heading "Heading"
     :DefaultOpen true
     :Contents (-> "Content" (UI.Label)))))

  (GFX.Render :Steps .render-steps)))

 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    :Contents
    (UI.Collapsing
     :Heading (UI.Button "Heading" (Msg "Clicked"))
     :DefaultOpen true
     :Contents (-> "Content" (UI.Label)))))

  (GFX.Render :Steps .render-steps)))