JaggerJo.Avalonia.FuncUI.Elmish 0.1.0

Suggested Alternatives

Avalonia.FuncUI.Elmish

Additional Details

Package name was changed.

There is a newer version of this package available.
See the version list below for details.
dotnet add package JaggerJo.Avalonia.FuncUI.Elmish --version 0.1.0                
NuGet\Install-Package JaggerJo.Avalonia.FuncUI.Elmish -Version 0.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JaggerJo.Avalonia.FuncUI.Elmish" Version="0.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JaggerJo.Avalonia.FuncUI.Elmish --version 0.1.0                
#r "nuget: JaggerJo.Avalonia.FuncUI.Elmish, 0.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install JaggerJo.Avalonia.FuncUI.Elmish as a Cake Addin
#addin nuget:?package=JaggerJo.Avalonia.FuncUI.Elmish&version=0.1.0

// Install JaggerJo.Avalonia.FuncUI.Elmish as a Cake Tool
#tool nuget:?package=JaggerJo.Avalonia.FuncUI.Elmish&version=0.1.0                

<img src="github/img/icon.png" width="100"/>

Avalonia.FuncUI

Build Status

Develop cross-plattform MVU GUI Applications using F# and Avalonia!

About

This library allows you to write cross-plattform GUI Applications entirely in F# - No XAML, but a declarative elm like DSL. MVU (Model-View-Update) architecture support is built in, and bindings to use it with Elmish are also ready to use.

Current State

Should be usable, but expect bugs and some breaking changes. Basically wet paint.

Contributing

Please contribute to this library through issue reports, pull requests, code reviews and discussion.

Getting started

Avalonia.FuncUI nuget

Install-Package JaggerJo.Avalonia.FuncUI

Avalonia.FuncUI.Elmish nuget

Install-Package JaggerJo.Avalonia.FuncUI.Elmish

Project templates will follow soon.

For now check out the Examples.

Example

Below is the code of a simple counter app (using the Avalonia.FuncUI.Elmish package).

module Counter =

    type CounterState = {
        count : int
    }

    let init = {
        count = 0
    }

    type Msg =
    | Increment
    | Decrement

    let update (msg: Msg) (state: CounterState) : CounterState =
        match msg with
        | Increment -> { state with count =  state.count + 1 }
        | Decrement -> { state with count =  state.count - 1 }
    
    let view (state: CounterState) (dispatch): View =
        Views.dockPanel [
            Attrs.children [
                Views.button [
                    Attrs.click (fun sender args -> dispatch Increment)
                    Attrs.content "click to increment"
                ]
                Views.button [
                    Attrs.click (fun sender args -> dispatch Decrement)
                    Attrs.content "click to decrement" 
                ]
                Views.textBlock [
                    Attrs.dockPanel_dock Dock.Top
                    Attrs.text (sprintf "the count is %i" state.count)
                ]
            ]
        ]    
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on JaggerJo.Avalonia.FuncUI.Elmish:

Package Downloads
XTargets.FuncUI

Package Description

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on JaggerJo.Avalonia.FuncUI.Elmish:

Repository Stars
AvaloniaCommunity/Avalonia.Microcharts
simple Avalonia only port of the Microcharts charting library