Elm-Bulma is a simple and beautiful front-end library.
Documentation
- Learn about the components at bulma.io.
- For API information, head over to the Elm package.
Getting Started
- Make a new project:
mkdir bulma-example && cd bulma-example
. - Install the package:
elm package install --yes surprisetalk/elm-bulma
. - Create a new file
Example.elm
and copy this example file or the code below. - Start
elm reactor
and navigate to http://localhost:8000/Example.elm.
module Example exposing (..)
import Browser
import Bulma.CDN exposing (..)
import Bulma.Modifiers exposing (..)
import Bulma.Elements exposing (..)
import Bulma.Columns exposing (..)
import Bulma.Layout exposing (..)
import Html exposing ( Html, main_, text )
type alias Model = {}
main : Program () Model Msg
main
= Browser.sandbox
{ init = {}
, view = view
, update = \msg -> \model -> model
}
view : Model -> Html msg
view model
= main_ []
[ stylesheet
, exampleHero
, exampleColumns
]
exampleHero : Html msg
exampleHero
= hero { heroModifiers | size = Medium, color = Primary } []
[ heroBody []
[ container []
[ title H1 [] [ text "Hero Title" ]
, title H2 [] [ text "Hero Subtitle" ]
]
]
]
exampleColumns : Html msg
exampleColumns
= section NotSpaced []
[ container []
[ columns columnsModifiers []
[ column columnModifiers [] [ text "First Column" ]
, column columnModifiers [] [ text "Second Column" ]
, column columnModifiers [] [ text "Third Column" ]
]
]
]
Contributions
- Feel free to report bugs on Github.
- If you have any suggestions on how to make the API more friendly, please reach out to me at [email protected].
Remove `elm-bulma-classes` dependency
Unfortunately,
elm-bulma-classes
is no longer being maintained. I'm thinking that we should make an equivalent, either in this package or a separate one. We're open to suggestions!Why is there no `Width12` in Width type?
Hi Currently, Width type has
Auto
,Width1
~Width11
. However, Bulma supportsis-12
. Why is there noWidth12
in Width type? Please tell me if there is a workaround you do not need.Can we get the navbar added
Spec is here http://bulma.io/documentation/components/navbar/
Would be great to have this added. I'd create a PR but I'm very new to Bulma.
If you like I can open a PR with my guess at what needs to happen.
Thanks
Form.controlSelect and Small size
I wrote like below.
It generate:
But should be:
Fix package documentation for connectedFields
In the Elm package documentation, the example code for the
connectedFields
function specifiesfields
rather thanconnectedFields
.Currently:
Should be:
Fix navbarBurger tag from to avoiding page reload.
-
7
for form control
-
8
-
9
-
10
-
11
-
12
When following the example provided in documentation, clicking on the burger triggers a page reload. As suggested in an issue on the official Bulma GitHub repository, changing the
<a>
to a<div>
fixes the problem.Elm version:
0.19.1
OS:macOS Catalina 10.15.1
replace
with
The Bulma website uses
div
tags forcontrol
s , notp
tags.We should do the same. This would remove the big spacing between
label
andinput
because of thep
tag.Package documentation needs to be updated?
The record field name and type of
gapless
inColumnsModifiers
needs to be updated. https://package.elm-lang.org/packages/surprisetalk/elm-bulma/latest/Bulma-Columns#columnsModifiersI think the following is correct for v6.1.4:
Thanks in advance.
Example in README.md doesn't work
hey there ! beautiful project <3
In the read me you put this code
elm complains that at line 13
main : Program () Model Msg
Msg is not defined Im a beginner at elm so i can't help ^^'Fixed button documention
I fixed the buttons and connectedButtons documentation (sample in comments). The button component was missing the second argument: List (Attribute msg).
Reason for anchors as buttons
I noticed it was very intentional in d3cf31450cc52da57608b35f560a2ea0e88a97bd, but why did this happen? Obviously you had something in mind so I might just be missing something.
Mainly, I keep encountering #17 which is easily work-around-able, but with a
button
tag it wouldn't even be an issue in a lot of cases.Thanks for the great work! I love the library so far.
Example code in documentation for navbarBurger contains a syntax error
This code is missing the prototype and parameter for the
isMenuOpen
Boolean