FS.FluentUI 2.3.0

dotnet add package FS.FluentUI --version 2.3.0                
NuGet\Install-Package FS.FluentUI -Version 2.3.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="FS.FluentUI" Version="2.3.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FS.FluentUI --version 2.3.0                
#r "nuget: FS.FluentUI, 2.3.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 FS.FluentUI as a Cake Addin
#addin nuget:?package=FS.FluentUI&version=2.3.0

// Install FS.FluentUI as a Cake Tool
#tool nuget:?package=FS.FluentUI&version=2.3.0                

FS.FluentUI

V9 of Microsoft's FluentUI (React) made for F# in the style of Feliz

NuGet version (FS.FluentUI) NuGet Downloads

DataGridGif

Please see all F# component examples in the FS.FluentUI Wiki

Please check Microsoft's documentation for further component usage and descriptions

Overview

Fluent UI React Components is a set of UI components and utilities resulting from an effort to converge the set of React based component libraries in production today: @fluentui/react and @fluentui/react-northstar.

Each component is designed to adhere to the following standards:

  • Customizable: Fluent-styled components by default, but easy to integrate your own brand and theme
  • Performance: Optimized for render performance
  • Bundle size: Refactored and slimmed down components that allow you to include the packages and dependencies you need
  • Accessibility: WCAG 2.1 compliant and tested by trusted testers
  • Design to Code: Stay up to date with Fluent Design Language changes via Design Tokens

NOTE: Some components/ functions are incomplete or still considered Preview Components and/or unstable by Microsoft. Please feel free to send PR's in order to get this library as close to 100% as possible!

Place a Fui.fluentProvider at the root of your app and pass the theme in as a prop. You can use pre-determined themes, or create your own BrandVariants or Tokens to use for your theme. See the wiki for specific examples.

open Feliz
open Browser.Dom
open FS.FluentUI
open FS.FluentUI.V8toV9

let useStyles =
    Fui.makeStyles<{| toggleButtons: string |}> [
        "toggleButtons", [
            style.height (length.px 300 )
            style.width (length.px 300)
            style.margin (length.px 50)
            style.border (4, borderStyle.solid, "purple")
        ]
    ]

[<ReactComponent>]
let ToggleButtons () =
    let isChecked1, setIsChecked1 = React.useState true
    let isChecked2, setIsChecked2 = React.useState false

    let styles = useStyles()

    // The use of Fui.stack is preferential and is available through FS.FluentUI.V8toV9
    Fui.stack [
        stack.horizontal false
        stack.horizontalAlign.center
        stack.verticalAlign.center
        stack.tokens [ stack.tokens.childrenGap 16 ]
        stack.className styles.toggleButtons
        stack.children [
            Fui.toggleButton [
                toggleButton.icon (Fui.icon.checkbox1Filled [])
                toggleButton.checked' isChecked1
                toggleButton.onClick (fun _ -> setIsChecked1 (isChecked1 |> not))
                toggleButton.text "Checked state"
            ]
            Fui.toggleButton [
                toggleButton.appearance.primary
                toggleButton.checked' isChecked2
                toggleButton.onClick (fun _ -> setIsChecked2 (isChecked2 |> not))
                toggleButton.text "Unchecked state"
            ]
            Fui.toggleButton [
                toggleButton.shape.circular
                toggleButton.disabledFocusable true
                toggleButton.text "Disabled focusable"
            ]
        ]
    ]

let root = ReactDOM.createRoot (document.getElementById "feliz-app")
root.render (
    Fui.fluentProvider [
        fluentProvider.theme.webLightTheme
        fluentProvider.children [
            ToggleButtons ()
        ]
    ]
)

FSReadMe

Installation

Current NPM dependencies:

  • @fluentui/react-components
  • @fluentui/react-datepicker-compat
  • @fluentui/react-calendar-compat
  • @fluentui/react-timepicker-compat
  • @fluentui-contrib/react-data-grid-react-window
  • react-window

Install into your Client.fsproj project using Femto (recommended)

cd ./{path to Client}

# when using femto as a global CLI tool
femto install FS.FluentUI

# when using femto as a local CLI tool
dotnet femto install FS.FluentUI

This will install the nuget package and afterwards automatically installs the required npm packages used by this binding.

Femto will detect whether you are using paket and will install the package using paket into the dependency group of the project

You can install the library manually if you want by first installing the nuget package

cd ./{path to your project}
dotnet add package FS.FluentUI
npm install @fluentui/react-components @fluentui/react-datepicker-compat @fluentui/react-calendar-compat @fluentui/react-timepicker-compat @fluentui-contrib/react-data-grid-react-window react-window
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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.3.0 143 1/22/2025
2.2.0 26 1/8/2025
2.1.0 182 12/27/2024
2.0.0 91 12/23/2024
1.17.0 100 12/11/2024
1.16.2 120 12/4/2024
1.16.1 340 11/11/2024
1.16.0 130 10/9/2024
1.15.2 853 7/27/2024
1.15.1 133 6/26/2024
1.15.0 206 6/7/2024
1.14.0 134 5/20/2024
1.13.0 159 4/24/2024
1.12.0 156 4/1/2024
1.11.0 198 1/23/2024
1.10.0 145 1/11/2024
1.9.0 234 12/22/2023
1.8.0 189 12/3/2023
1.7.0 144 11/27/2023
1.6.0 157 11/11/2023
1.5.0 159 11/2/2023
1.4.0 131 10/30/2023
1.3.0 146 10/23/2023
1.2.0 154 10/18/2023
1.1.0 197 10/6/2023
1.0.4 156 10/6/2023
1.0.3 151 10/6/2023
1.0.2 158 10/5/2023
1.0.1 174 9/25/2023
1.0.0 169 9/25/2023
1.0.0-prerelease-003 120 9/21/2023
1.0.0-prerelease-002 140 9/18/2023
1.0.0-prerelease-001 123 9/15/2023
0.0.1-beta12 142 9/14/2023
0.0.1-beta11 148 9/12/2023
0.0.1-beta10 126 9/12/2023
0.0.1-beta09 151 9/11/2023
0.0.1-beta08 139 9/11/2023
0.0.1-beta07 142 9/8/2023
0.0.1-beta06 140 9/7/2023
0.0.1-beta05 128 9/7/2023
0.0.1-beta04 164 9/1/2023
0.0.1-beta03 128 8/31/2023
0.0.1-beta02 160 8/29/2023

- Add FixedSizeList component
           - Add react-window to NPM dependencies
           - Update @fluentui/react-components to 9.58.0
           - Update secondary NPM deps
           - Update @fluentui/react-nav-preview to 0.11.0
           - Add density prop to Nav component
           - Add missing Motion slots for Drawer components
           - Add navigationMode prop to Tree and FlatTree components