{"id":14965132,"url":"https://github.com/fabulous-dev/fabulous.avalonia","last_synced_at":"2025-05-16T02:08:24.695Z","repository":{"id":63560460,"uuid":"564698895","full_name":"fabulous-dev/Fabulous.Avalonia","owner":"fabulous-dev","description":"Declarative UIs for Avalonia with F# and MVU, using Fabulous","archived":false,"fork":false,"pushed_at":"2025-05-10T16:23:03.000Z","size":62007,"stargazers_count":151,"open_issues_count":2,"forks_count":12,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-10T17:28:32.267Z","etag":null,"topics":["android","avalonia","declarative-ui","fabulous","fsharp","ios","linux","macos","mvu","web","windows"],"latest_commit_sha":null,"homepage":"https://docs.fabulous.dev/avalonia","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabulous-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["edgarfgp","TimLariviere"]}},"created_at":"2022-11-11T09:37:44.000Z","updated_at":"2025-05-05T16:11:45.000Z","dependencies_parsed_at":"2023-09-27T00:02:00.261Z","dependency_job_id":"f97ef38b-dfec-4b5b-ba20-0dec266808d9","html_url":"https://github.com/fabulous-dev/Fabulous.Avalonia","commit_stats":{"total_commits":987,"total_committers":15,"mean_commits":65.8,"dds":"0.22087132725430603","last_synced_commit":"3c241d0fce10063285516b3029c8429ce12002ea"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulous-dev%2FFabulous.Avalonia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulous-dev%2FFabulous.Avalonia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulous-dev%2FFabulous.Avalonia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulous-dev%2FFabulous.Avalonia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabulous-dev","download_url":"https://codeload.github.com/fabulous-dev/Fabulous.Avalonia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453655,"owners_count":22073617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","avalonia","declarative-ui","fabulous","fsharp","ios","linux","macos","mvu","web","windows"],"created_at":"2024-09-24T13:34:16.105Z","updated_at":"2025-05-16T02:08:19.683Z","avatar_url":"https://github.com/fabulous-dev.png","language":"F#","funding_links":["https://github.com/sponsors/edgarfgp","https://github.com/sponsors/TimLariviere"],"categories":[],"sub_categories":[],"readme":"# Fabulous for Avalonia\n\n[![build](https://img.shields.io/github/actions/workflow/status/fabulous-dev/Fabulous.Avalonia/build.yml?branch=main)](https://github.com/fabulous-dev/Fabulous.Avalonia/actions/workflows/build.yml) [![NuGet version](https://img.shields.io/nuget/v/Fabulous.Avalonia)](https://www.nuget.org/packages/Fabulous.Avalonia#readme-body-tab) [![NuGet downloads](https://img.shields.io/nuget/dt/Fabulous.Avalonia)](https://www.nuget.org/packages/Fabulous.Avalonia) [![Discord](https://img.shields.io/discord/716980335593914419?label=discord\u0026logo=discord)](https://discord.gg/bpTJMbSSYK) [![Twitter Follow](https://img.shields.io/twitter/follow/FabulousAppDev?style=social)](https://twitter.com/FabulousAppDev)\n\nFabulous.Avalonia brings the great development experience of Fabulous to [AvaloniaUI](https://github.com/AvaloniaUI/Avalonia), allowing you to take advantage of this UI framework with a tailored declarative UI DSL and clean architecture.\n\nDeploy to any platform supported by Avalonia, such as Android, iOS, macOS, Windows, Linux and more!\n\n### MVU Sample\n\n```fs\nnamespace CounterApp\n\nopen System.Diagnostics\nopen Fabulous\nopen Fabulous.Avalonia\nopen Avalonia.Themes.Fluent\n\nopen type Fabulous.Avalonia.View\n\nmodule App =\n    type Model =\n        { Count: int; Step: int; TimerOn: bool }\n\n    type Msg =\n        | Increment\n        | Decrement\n        | Reset\n        | SetStep of float\n        | TimerToggled of bool\n        | TimedTick\n\n    let initModel = { Count = 0; Step = 1; TimerOn = false }\n\n    let timerCmd () =\n        async {\n            do! Async.Sleep 200\n            return TimedTick\n        }\n        |\u003e Cmd.OfAsync.msg\n\n    let init () = initModel, Cmd.none\n\n    let update msg model =\n        match msg with\n        | Increment -\u003e\n            { model with\n                Count = model.Count + model.Step },\n            Cmd.none\n        | Decrement -\u003e\n            { model with\n                Count = model.Count - model.Step },\n            Cmd.none\n        | Reset -\u003e initModel, Cmd.none\n        | SetStep n -\u003e { model with Step = int(n + 0.5) }, Cmd.none\n        | TimerToggled on -\u003e { model with TimerOn = on }, (if on then timerCmd() else Cmd.none)\n        | TimedTick -\u003e\n            if model.TimerOn then\n                { model with\n                    Count = model.Count + model.Step },\n                timerCmd()\n            else\n                model, Cmd.none\n\n    let program = Program.statefulWithCmd init update\n\n    let content () =\n        Component(\"CounterApp\") {\n            let! model = Context.Mvu program\n\n            (VStack() {\n                TextBlock($\"%d{model.Count}\").centerText()\n\n                Button(\"Increment\", Increment).centerHorizontal()\n\n                Button(\"Decrement\", Decrement).centerHorizontal()\n\n                (HStack() {\n                    TextBlock(\"Timer\").centerVertical()\n\n                    ToggleSwitch(model.TimerOn, TimerToggled)\n                })\n                    .margin(20.)\n                    .centerHorizontal()\n\n                Slider(0., 10., float model.Step, SetStep)\n\n                TextBlock($\"Step size: %d{model.Step}\").centerText()\n\n                Button(\"Reset\", Reset).centerHorizontal()\n\n            })\n                .center()\n        }\n\n    let view () =\n#if MOBILE\n        SingleViewApplication(content())\n#else\n        DesktopApplication(Window(content()))\n#endif\n    let create () =\n\n        FabulousAppBuilder.Configure(FluentTheme, view)\n```\n\n## Additional Controls\n\nWe also provide additional binding for Avalonia controls, you can find them in the following packages:\n\n- Fabulous.Avalonia.DataGrid [![NuGet version](https://img.shields.io/nuget/v/Fabulous.Avalonia.DataGrid)](https://www.nuget.org/packages/Fabulous.Avalonia.DataGrid#readme-body-tab)\n- Fabulous.Avalonia.ColorPicker [![NuGet version](https://img.shields.io/nuget/v/Fabulous.Avalonia.ColorPicker)](https://www.nuget.org/packages/Fabulous.Avalonia.ColorPicker#readme-body-tab)\n- Fabulous.Avalonia.Diagnostics [![NuGet version](https://img.shields.io/nuget/v/Fabulous.Avalonia.Diagnostics)](https://www.nuget.org/packages/Fabulous.Avalonia.Diagnostics#readme-body-tab)\n- Fabulous.Avalonia.ItemsRepeater [![NuGet version](https://img.shields.io/nuget/v/Fabulous.Avalonia.ItemsRepeater)](https://www.nuget.org/packages/Fabulous.Avalonia.ItemsRepeater#readme-body-tab)\n- Fabulous.Avalonia.TreeDataGrid [![NuGet version](https://img.shields.io/nuget/v/Fabulous.Avalonia.TreeDataGrid)](https://www.nuget.org/packages/Fabulous.Avalonia.TreeDataGrid#readme-body-tab)\n- Fabulous.Avalonia.Labs [![NuGet version](https://img.shields.io/nuget/v/Fabulous.Avalonia.Labs)](https://www.nuget.org/packages/Fabulous.Avalonia.Labs#readme-body-tab)\n\n## Getting Started\n\nYou can start your new Fabulous.Avalonia app in a matter of seconds using the dotnet CLI templates.  \nFor a starter guide see our [Get Started with Fabulous.Avalonia](https://docs.fabulous.dev/avalonia/get-started).\n\n## How to use the templates\n\nUsing the dotnet CLI, install the templates:\n\n```sh\ndotnet new install Fabulous.Avalonia.Templates\n```\n\nThen, you will be able to create new Fabulous.Avalonia projects with `dotnet new`:\n\n#### Desktop Project\n\nDesktop project is a standard Avalonia project that can target Desktop platforms only.\n\n```sh\ndotnet new fabulous-avalonia-desktop -n MyApp\n```\n\n#### Single Project\n\nSingle project takes the platform-specific development experiences and abstracts them into a single shared project that can target Android, iOS, Desktop.\n\n```sh\ndotnet new fabulous-avalonia -n MyApp\n```\n\n```tree\nMyApp\n├── Platform\n    ├── Android\n    ├── iOS\n    └── Desktop\n```\n\nNote: Browser is not supported in single project template.\n\n#### Multi Project\n\nMulti project takes the platform-specific development and abstracts them into a multiple projects that can target Android, iOS, Desktop, Browser.\n\n```sh\ndotnet new fabulous-avalonia-multi -n MyApp\n```\n\n```tree\nMyApp\n├── MyApp\n├── MyApp.Android\n├── MyApp.iOS\n├── MyApp.Desktop\n└── MyApp.Browser\n```\n\nnet8.0-ios is not supported on Linux, thus net8.0-ios is excluded from build on a Linux host.\n\n## Controls Gallery\nTo run the `Gallery` sample app from the command line:\n\n- This will restore the required workloads for the samples\n\n```shell\ndotnet workload restore\n```\n\n- Then you can run the Gallery sample\n\n```shell\ncd samples/Gallery\ndotnet run -f net8.0\n```\n\nYou can also open the solution `Fabulous.Avalonia.sln` with your favorite IDE(We recommend [Rider](https://www.jetbrains.com/rider/)) and select the platform you want, then press debug to deploy and run the app.\n\n## Documentation\n\nThe full documentation for Fabulous.Avalonia can be found at [docs.fabulous.dev/avalonia](https://docs.fabulous.dev/avalonia).\n\nOther useful links:\n- [The official Fabulous website](https://fabulous.dev)\n- [Get started](https://docs.fabulous.dev/avalonia/get-started)\n- [Samples](https://github.com/fabulous-dev/Fabulous.Avalonia/tree/main/samples)\n- [API Reference](https://api.fabulous.dev/avalonia)\n- [Contributor Guide](CONTRIBUTING.md)\n\nAdditionally, we have the [Fabulous Discord server](https://discord.gg/bpTJMbSSYK) where you can ask any of your Fabulous related questions.\n\n## Supporting Fabulous\n\nThe simplest way to show us your support is by giving this project and the [Fabulous project](https://github.com/fabulous-dev/Fabulous) a star.\n\nYou can also support us by becoming our sponsor on the GitHub Sponsors program.  \nThis is a fantastic way to support all the efforts going into making Fabulous the best declarative UI framework for dotnet.\n\nIf you need support see Commercial Support section below.\n\n## Contributing\n\nHave you found a bug or have a suggestion of how to enhance Fabulous? Open an issue and we will take a look at it as soon as possible.\n\nDo you want to contribute with a PR? PRs are always welcome, just make sure to create it from the correct branch (main) and follow the [Contributor Guide](CONTRIBUTING.md).\n\nFor bigger changes, or if in doubt, make sure to talk about your contribution to the team. Either via an issue, GitHub discussion, or reach out to the team either using the [Discord server](https://discord.gg/bpTJMbSSYK).\n\n## Old Version\n\nThis repository is about Fabulous v2. You can find Version 1 [here.](https://github.com/fabulous-dev/Fabulous/tree/release/1.0)\n\n## Commercial support\n\nIf you would like us to provide you with:\n\n- training and workshops,\n- support services,\n- and consulting services.\n\nFeel free to contact us: [support@fabulous.dev](mailto:support@fabulous.dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabulous-dev%2Ffabulous.avalonia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabulous-dev%2Ffabulous.avalonia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabulous-dev%2Ffabulous.avalonia/lists"}