Code Monkey home page Code Monkey logo

elm-font-awesome-5's Introduction

About this fork

This fork was published because I needed this library ported to 0.19, and couldn't wait until the original maintainer had time to do so.

Documentation from original fork

Elm Font Awesome 5

A strongly typed Elm package for using Font Awesome 5 icons in your views.

All Font Awesome 5 icons are included. Previous versions of Font Awesome are not supported.

Motivation

Unlike other Font Awesome packages for Elm, this package exposes all of Font Awesome's features, allowing full customization of icons.

This package also prevents the possibility of writing an invalid Font Awesome element. Any missing or improper inputs result in a compile-time error.

Examples

Basic use case

import FontAwesome exposing (icon, copy)
import Html exposing (div)

view : Html msg
view =
    div
        []
        [ icon copy ]

-- This would spit out the following HTML
-- <div>
--     <i class="fas fa-copy"></i>
-- </div>

With options

import FontAwesome exposing (iconWithOptions, spinner, Large, Light, Spin, Size)
import Html exposing (div)
import Html.Attributes exposing (title)

view : Html msg
view =
    div
        []
        [ iconWithOptions
            spinner
            Light
            [ Spin, Size Large ]
            [ title "Page is loading" ]

-- This would spit out the following HTML
-- <div>
--     <i class="fal fa-spinner fa-spin fa-lg" title="Page is loading"></i>
-- </div>

elm-font-awesome-5's People

Contributors

holymeekrob avatar frandibar avatar razzeee avatar

Stargazers

Thomas Meijers avatar Balazs Erdos avatar Ivan D Vasin avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.