Add daisyUI support
DaisyUI is a component library for Tailwind CSS.
To use the library from within F# we will use Feliz.DaisyUI (Github).
-
Follow the instructions for how to add Tailwind CSS to your project
-
Add daisyUI JS dependencies using NPM:
npm i -D daisyui@latest
-
Add Feliz.DaisyUI .NET dependency...
- via Paket:
dotnet paket add Feliz.DaisyUI
- via NuGet:
dotnet add package Feliz.DaisyUI
- via Paket:
-
Update the
tailwind.config.js
file'smodule.exports.plugins
array; addrequire("daisyui")
tailwind.config.jsmodule.exports = { content: [ './src/Client/**/*.html', './src/Client/**/*.fs', ], theme: { extend: {}, }, plugins: [ require("daisyui"), ], }
-
Open the daisyUI namespace wherever you want to use it.
YourFileHere.fsopen Feliz.DaisyUI
-
Congratulations, now you can use daisyUI components!
Documentation can be found at https://dzoukr.github.io/Feliz.DaisyUI/