jasonliang512/elm-heroicons/1.2.0

NOTE: the latest version is 2.4.0

Renamed to jasonliang-dev/elm-heroicons. It is published under that name, and new versions come out there.

Versions published as jasonliang512/elm-heroicons still install under that name. 11 versions of 11 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/jasonliang-dev/elm-heroicons.

What we checked: The repo moved to github.com/jasonliang-dev/elm-heroicons. Rebuilt with git archive from commit 732b44725436 of https://github.com/jasonliang-dev/elm-heroicons (zip prefix jasonliang512-elm-heroicons-732b447/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 28304aac6322f5d5cddb71a69e2836ed4626db6b.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/jasonliang512/elm-heroicons/zipball/1.2.0/

Heroicons for elm

This package provides Heroicons as elm/svg elements.

Install

elm install jasonliang512/elm-heroicons

# optional
elm install elm/svg

Example Usage

import Html exposing (Html, a, text)
import Html.Attributes exposing (class, href, style)
import Heroicons.Solid exposing (externalLink)


externalLinkButton : String -> String -> Html msg
externalLinkButton link content =
    a [ class "external-link-button", href link ]
        [ text content
        , externalLink [ style "width" "2rem", style "color" "blue" ]
        ]

When styling with classes, use Svg.Attributes.class for the icons. Do not use Html.Attributes.class:

import Html.Attributes exposing (class)
import Svg.Attributes
import Heroicons.Solid


-- INCORRECT
Heroicons.Solid.mail [ class "icon" ]


-- CORRECT
Heroicons.Solid.mail [ Svg.Attributes.class "icon" ]

If you don't want to import Svg.Attributes, you can leave the attribute list empty and create a containing element to style the icon.

import Html exposing (span)
import Html.Attributes exposing (class)
import Heroicons.Outline

span [ class "inline-block icon" ] [ Heroicons.Outline.userAdd [] ]