Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 937 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 937 Bytes

Font Awesome for Elm

Use the incredible Font Awesome vector icon library without leaving the comfort of your Elm environment.

This library exposes scalable vector icons as Elm HTML components.

Check out the Font Awesome website linked above to see what the icons look like.

How to use?

Check the complete example here.

Every Font Awesome icons automatically inherits CSS size and colors from their parents.

import FontAwesome.Regular as RegularIcon
import FontAwesome.Brands as BrandsIcon
import FontAwesome.Solid as SolidIcon


view _ =
    div
        [ style [ ( "width", "100px" ) ] ]
        [ div [ style [ ( "color", "red" ) ] ] [ RegularIcon.address_book ]
        , br [] []
        , div [ style [ ( "width", "300px" ) ] ] [ SolidIcon.address_book ]
        , br [] []
        , div [ style [ ( "color", "blue" ) ] ] [ BrandsIcon.fa_500px ]
        ]