jacobstanley / elm-font-awesome

Font Awesome vector icons as Elm HTML components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 ]
        ]

About

Font Awesome vector icons as Elm HTML components


Languages

Language:Elm 99.7%Language:Shell 0.3%