Skip to content

How do I add Feliz to a SAFE project?

Feliz is a wrapper for the base React DSL library that emphasises consistency, lightweight formatting, discoverable attributes and full type-safety. The default SAFE Template already uses Feliz.

Using Feliz

  1. Add Feliz to your project
dotnet paket add Feliz -p Client
  1. Start using Feliz in your code.
open Feliz

Html.button [
    prop.style [ style.marginLeft 5 ]
    prop.onClick (fun _ -> setCount(count - 1))
    prop.text "Decrement"
]