Skip to content

Commit 6bbdfa5

Browse files
Merge pull request #344 from Larocceau/add-bulma
Add "add bulma" recipe
2 parents fede396 + daa32a3 commit 6bbdfa5

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

docs/recipes/ui/add-bulma.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# How do I add Bulma to a SAFE project?
2+
3+
[Bulma](https://bulma.io/documentation/) is a free open-source UI framework based on flexbox that helps you create modern and responsive layouts.
4+
5+
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.
6+
7+
## 1. Add the Feliz.Bulma NuGet package to the client project
8+
9+
```
10+
dotnet paket add Feliz.Bulma -p Client
11+
```
12+
13+
## 2. Add the Bulma stylesheet to `index.html`
14+
15+
```.diff
16+
...
17+
<head>
18+
...
19+
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
20+
</head>
21+
...
22+
```
23+
24+
## 3. Start using Feliz.Bulma components in your F# files.
25+
26+
```fsharp
27+
open Feliz.Bulma
28+
29+
Bulma.button.button [
30+
str "Click me!"
31+
]
32+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ nav:
9090
- Add Feliz support: "recipes/ui/add-feliz.md"
9191
- Add FontAwesome support: "recipes/ui/add-fontawesome.md"
9292
- Migrate from a CDN stylesheet to an NPM package: "recipes/ui/cdn-to-npm.md"
93+
- Add Bulma Support: "recipes/ui/add-bulma.md"
9394
- Add routing with state shared between pages: "recipes/ui/add-routing.md"
9495
- Add routing with separate models per page: "recipes/ui/add-routing-with-separate-models.md"
9596
- Add Routing with UseElmish: "recipes/ui/routing-with-elmish.md"

0 commit comments

Comments
 (0)