View Source Lucideicons.Icon (lucide_icons v1.1.2)

This module defines the data structure and functions for working with icons stored as SVG files.

Summary

Functions

Defines the Lucideicons.Icon struct

Inserts HTML attributes into an SVG icon

Converts opts to HTML attributes

Parses a SVG file and returns structured data

Types

@type t() :: %Lucideicons.Icon{file: binary(), name: String.t()}

Functions

Link to this function

%Lucideicons.Icon{}

View Source (struct)

Defines the Lucideicons.Icon struct

Its fields are:

* `:file` - the binary of the icon

* `:name` - the name of the icon
Link to this function

insert_attrs(arg, attrs)

View Source
@spec insert_attrs(
  binary(),
  keyword()
) :: Phoenix.HTML.safe()

Inserts HTML attributes into an SVG icon

@spec opts_to_attrs(map()) :: list()

Converts opts to HTML attributes

@spec parse!(Path.t()) :: t()

Parses a SVG file and returns structured data