An alternative view rendering API for Fabulous (Elmish Xamarin.Forms) that is easy to use and simple to read, inspired by Elmish on the web.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
.paket Add support for Ref and Created props, Add ScrollView, close #1 Sep 30, 2018
assets Add LoginFlow sample with screen gif Sep 15, 2018
samples Add LoginFlow sample with screen gif Sep 15, 2018
src Add support for Ref and Created props, Add ScrollView, close #1 Sep 30, 2018
.gitignore Initial commit Sep 9, 2018
.travis.yml
LICENSE Initial commit Sep 9, 2018
Nuget.Config
README.md
build.cmd Initial commit Sep 9, 2018
build.fsx Initial commit Sep 9, 2018
build.sh Initial commit Sep 9, 2018
paket.dependencies
paket.lock Add support for Ref and Created props, Add ScrollView, close #1 Sep 30, 2018

README.md

Fabulous.SimpleElements Nuget Build Status

An alternative view rendering API for Fabulous that is easy to use and simple to read, inspired by Elmish on the web.

Install from Nuget

dotnet add package Fabulous.SimpleElements	

Example Code

The library aims to unify both optional arguments and fluent extension methods for View elements into a list of attributes

StackLayout.stackLayout [
    StackLayout.Padding 20.0 
    StackLayout.VerticalLayout LayoutOptions.Center
    StackLayout.Children [ 
        Label.label [ 
            Label.Text "Congrats, you have won!"; 
            Label.HorizontalTextAlignment TextAlignment.Center
            Label.MarginLeft 30.0
            Label.MarginRight 30.0
            Label.FontSize FontSize.Large 
        ]

        Button.button [ 
            Button.Text "Play Again"
            Button.OnClick (fun _ -> dispatch StartNewGame) 
        ]
    ]
]

Running the samples

Each sample has it's own solution, open any of the samples in Visual Studio or Visual Studio for Mac, select your preferred project to start the app, either <AppName>.Android or <AppName>.iOS and run the project.

Fifteen Puzzle Sample

fifteen-puzzle

LoginFlow sample

login-flow

Counter Sample

Counter