-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #344 from Larocceau/add-bulma
Add "add bulma" recipe
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# How do I add Bulma to a SAFE project? | ||
|
||
[Bulma](https://bulma.io/documentation/) is a free open-source UI framework based on flexbox that helps you create modern and responsive layouts. | ||
|
||
When using Feliz (the standard for a SAFE app), follow the instructions below. When using Fable.React, use the [Fulma](https://fulma.github.io/Fulma/) wrapper for Bulma. | ||
|
||
## 1. Add the Feliz.Bulma NuGet package to the client project | ||
|
||
``` | ||
dotnet paket add Feliz.Bulma -p Client | ||
``` | ||
|
||
## 2. Add the Bulma stylesheet to `index.html` | ||
|
||
```.diff | ||
... | ||
<head> | ||
... | ||
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css"> | ||
</head> | ||
... | ||
``` | ||
|
||
## 3. Start using Feliz.Bulma components in your F# files. | ||
|
||
```fsharp | ||
open Feliz.Bulma | ||
Bulma.button.button [ | ||
str "Click me!" | ||
] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters