chandru89new/elm-lucide

Lucide icons in Elm


License
BSD-3-Clause
Install
elm-package install chandru89new/elm-lucide 2.2.0

Documentation

Lucide Icons in Elm

  • This package currently supports Lucide v1.14.0.

Install

elm install chandru89new/elm-lucide

Use

Call LucideIcon.<icon-name-in-camel-case>:

module Main

import LucideIcons

-- a : Html msg
a = LucideIcons.albumIcon []

With svg options/properties:

module Main

import LucideIcons
import Svg.Attributes exposing (..)

-- a : Html msg
a = LucideIcons.albumIcon [strokeWidth "4"]

Icon name convention

Use camel case and append Icon to the name.

-- lucide icon = "armchair"
LucideIcon.armchairIcon

-- lucide icon = "arrow-left"
LucideIcon.arrowLeftIcon

-- lucide icon = "x"
LucideIcon.xIcon

-- lucide icon = "trash-2"
LucideIcon.trash2Icon

Icons

Type signature

LucideIcons.<icon> : List (Svg.Attribute msg) -> Html msg

Sizing guideline/tip

All svgs generated from this package have an inline style of width: 1em; height: 1em. For most use-cases, you won't have to tinker or give additional options. To control size of the icon, set a font-size on the parent element containing the icon.

a = H.span [Attribute.style "font-size" "14px" ] [ LucideIcon.albumIcon [] ]