Lucideicons.Icon (lucide_icons v2.1.1)

View Source

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

Parses a SVG file and returns structured data

Types

t()

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

Functions

%Lucideicons.Icon{}

(struct)

Defines the Lucideicons.Icon struct

Its fields are:

* `:file` - the binary of the icon

* `:name` - the name of the icon

insert_attrs(icon, assigns)

@spec insert_attrs(binary(), map()) :: Phoenix.HTML.safe()

Inserts HTML attributes into an SVG icon

latest_version()

parse!(filename)

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

Parses a SVG file and returns structured data