Skip to content
An elmish wrapper around Miguel de Icaza's 'Gui.cs' https://github.com/migueldeicaza/gui.cs including a fable like view DSL.
Branch: master
Clone or download
Daniel Hardt
Latest commit 64089e4 May 9, 2019

README.md

Terminal.Gui.Elmish

Build Status

An elmish wrapper around Miguel de Icaza's 'Gui.cs' https://github.com/migueldeicaza/gui.cs including a fable like view DSL.

anim gif

Usage:

Program.mkProgram init update view  
|> Program.run
    

Some fable-elmish DSL:

window [
    Styles [
        Pos (PercentPos 20.0,PercentPos 10.0)
        Dim (PercentDim 30.0,AbsDim 15)
    ]
    Title "Demo 1"
] [
    button [
        Styles [
            Pos (AbsPos 1, AbsPos 1)
        ]
        Text "Counter Up"
        OnClicked (fun () -> dispatch Inc)                    
    ] 

    button [
        Styles [
            Pos (AbsPos 1, AbsPos 2)
        ]
        Text "Counter Down"
        OnClicked (fun () -> dispatch Dec)                    
    ] 

                
]

Install via Nuget:

https://www.nuget.org/packages/Terminal.Gui.Elmish/0.1.0

dotnet add package Terminal.Gui.Elmish

A lot of Thanks to Miguel de Icaza. Nice Project!.

You can’t perform that action at this time.