Skip to content

Commit

Permalink
Merge pull request #344 from Larocceau/add-bulma
Browse files Browse the repository at this point in the history
Add "add bulma" recipe
  • Loading branch information
mattgallagher92 authored Jan 2, 2024
2 parents fede396 + daa32a3 commit 6bbdfa5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/recipes/ui/add-bulma.md
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!"
]
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ nav:
- Add Feliz support: "recipes/ui/add-feliz.md"
- Add FontAwesome support: "recipes/ui/add-fontawesome.md"
- Migrate from a CDN stylesheet to an NPM package: "recipes/ui/cdn-to-npm.md"
- Add Bulma Support: "recipes/ui/add-bulma.md"
- Add routing with state shared between pages: "recipes/ui/add-routing.md"
- Add routing with separate models per page: "recipes/ui/add-routing-with-separate-models.md"
- Add Routing with UseElmish: "recipes/ui/routing-with-elmish.md"
Expand Down

0 comments on commit 6bbdfa5

Please sign in to comment.