All Projects → Zaid-Ajaj → Fabulous Simple Elements

Zaid-Ajaj / Fabulous Simple Elements

Licence: mit
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.

Programming Languages

fsharp
127 projects

Projects that are alternatives of or similar to Fabulous Simple Elements

Csla
A home for your business logic in any .NET application.
Stars: ✭ 865 (+1911.63%)
Mutual labels:  xamarin, xamarin-forms
Reactiveui
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
Stars: ✭ 6,709 (+15502.33%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms
Xamarin.Forms Official Home
Stars: ✭ 5,485 (+12655.81%)
Mutual labels:  xamarin, xamarin-forms
Vsmacdeepclean
Visual Studio for macOS add-in / extension that brings you tasty features.
Stars: ✭ 33 (-23.26%)
Mutual labels:  xamarin, xamarin-forms
Realm Dotnet
Realm is a mobile database: a replacement for SQLite & ORMs
Stars: ✭ 927 (+2055.81%)
Mutual labels:  xamarin, xamarin-forms
Azure For Developers Workshop
The Azure cloud is huge and the vast service catalog may appear daunting at first, but it doesn’t have to be!
Stars: ✭ 38 (-11.63%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms.pancakeview
An extended ContentView for Xamarin.Forms with rounded corners, borders, shadows and more!
Stars: ✭ 744 (+1630.23%)
Mutual labels:  xamarin, xamarin-forms
Smarthotel360 Mobile
SmartHotel360 Mobile
Stars: ✭ 535 (+1144.19%)
Mutual labels:  xamarin, xamarin-forms
Uisleuth
A Xamarin.Forms Inspector
Stars: ✭ 21 (-51.16%)
Mutual labels:  xamarin, xamarin-forms
Brainpowerapp
A visual memory training game, a mobile game made with Xamarin for both Android and IOS .
Stars: ✭ 17 (-60.47%)
Mutual labels:  xamarin, xamarin-forms
Formswpflive
Live XAML development for Xamarin Forms Apps using WPF Backend.
Stars: ✭ 14 (-67.44%)
Mutual labels:  xamarin, xamarin-forms
Mvvmlight
The main purpose of the toolkit is to accelerate the creation and development of MVVM applications in Xamarin.Android, Xamarin.iOS, Xamarin.Forms, Windows 10 UWP, Windows Presentation Foundation (WPF), Silverlight, Windows Phone.
Stars: ✭ 973 (+2162.79%)
Mutual labels:  xamarin, xamarin-forms
Docs Archive
Xamarin docs archive
Stars: ✭ 553 (+1186.05%)
Mutual labels:  xamarin, xamarin-forms
Rg.plugins.popup
Xamarin Forms popup plugin
Stars: ✭ 964 (+2141.86%)
Mutual labels:  xamarin, xamarin-forms
Xf Material Library
A Xamarin Forms library for implementing Material Design
Stars: ✭ 537 (+1148.84%)
Mutual labels:  xamarin, xamarin-forms
Xamarinmediamanager
Cross platform Xamarin plugin to play and control Audio and Video
Stars: ✭ 647 (+1404.65%)
Mutual labels:  xamarin, xamarin-forms
Restaurant App
Restaurant App 🍔 is a sample open-source e-Commerce 🛒 application for ordering foods, powered by polyglot microservices architecture and cross-platform development including mobile and web
Stars: ✭ 471 (+995.35%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms.googlemaps
Map library for Xamarin.Forms using Google maps API
Stars: ✭ 483 (+1023.26%)
Mutual labels:  xamarin, xamarin-forms
Essential Ui Kit For Xamarin.forms
Free and beautiful XAML template pages for Xamarin.Forms apps.
Stars: ✭ 780 (+1713.95%)
Mutual labels:  xamarin, xamarin-forms
Tabstrip
Tab Strip control for Xamarin.Forms
Stars: ✭ 25 (-41.86%)
Mutual labels:  xamarin, xamarin-forms

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	

Usage

The library aims to unify both optional arguments and fluent extension methods for View elements into a list of attributes. This allows for easy API discoverability, just "dotting" through the element module to see what attributes you can set on the element.

let view (model: State) dispatch =
    ContentPage.contentPage [
        ContentPage.Title "Page Title"
        ContentPage.Content <|
            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) 
                    ]
                ]
            ]
    ]

Backwards compatible with existing DSL

This DSL is built on-top of the existing one in the core of Fabulous library which means if something isn't implemented here, that use can simply fallback to using the original DSL in a mix-and-match fashion:

let view (model: State) dispatch =
    View.ContentPage(
        title = "Page Title"
        ,content = StackLayout.stackLayout [ 
            StackLayout.Children [
                View.Button(text="Click me")
            ]
    ])

Extension methods are included with attributes

Instead of

View.Button(text="hello")
    .GridColumn(1)
    .GridRow(1)

you write

Button.button [
  Button.Text "Hello"
  Button.GridRow 1
  Button.GridColumn 1
]

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].