Skip to content

renanpvaz/elm-bem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BEM in Elm

This library contains utility functions for using the BEM convention in Elm avoiding verboseness and repetition. Browse the docs here.

import Bem

view : { stickyHeader : Bool } -> Html msg
view model =
    header
        [ Bem.mod "nav" ( "sticky", model.stickyHeader ) ]
        [ h1 [] [ text "header" ]
        -- ...
        ]

Installing

Run the following command in the root of your project

$ elm package install renanpvaz/elm-bem

and import the library in an Elm file like this

import Bem