LanternUI.Components.Icon (LanternUI v0.9.0)

Copy Markdown View Source

A small, curated inline-SVG icon set (Heroicons outline paths, MIT).

Self-contained by design: no icon font, no Tailwind plugin, no host asset pipeline — the SVG ships in the HTML, sized in em so it scales with text and colored via currentColor.

<.icon name="chevron-down" />
<.icon name="calendar-days" class="lui-mr-1" />

The set is deliberately minimal: what LanternUI's own components need plus the everyday few. It is not a general icon system — for that, use your host's icon setup.

An unknown name renders an empty glyph and warns rather than raising — see icon/1.

Summary

Functions

Renders an icon by name. Available: magnifying-glass, bars-3, calendar, view-columns, window, globe-alt, trash, circle-stack, exclamation-circle, check-circle, ellipsis-horizontal, cloud, plus, arrow-up-tray, folder-open, printer, calendar-days, funnel, chevron-right, arrow-trending-up, squares-2x2, chevron-up-down, map-pin, adjustments-horizontal, chart-bar, arrow-right, document, minus, arrow-path, chevron-up, x-mark, cursor-arrow-rays, sparkles, folder, chevron-left, inbox, pencil-square, chevron-down, arrow-down-tray, clock, information-circle, check, presentation-chart-line.

Functions

icon(assigns)

Renders an icon by name. Available: magnifying-glass, bars-3, calendar, view-columns, window, globe-alt, trash, circle-stack, exclamation-circle, check-circle, ellipsis-horizontal, cloud, plus, arrow-up-tray, folder-open, printer, calendar-days, funnel, chevron-right, arrow-trending-up, squares-2x2, chevron-up-down, map-pin, adjustments-horizontal, chart-bar, arrow-right, document, minus, arrow-path, chevron-up, x-mark, cursor-arrow-rays, sparkles, folder, chevron-left, inbox, pencil-square, chevron-down, arrow-down-tray, clock, information-circle, check, presentation-chart-line.

Attributes

  • name (:string) (required) - Icon key from the curated outline set. Must be one of "magnifying-glass", "bars-3", "calendar", "view-columns", "window", "globe-alt", "trash", "circle-stack", "exclamation-circle", "check-circle", "ellipsis-horizontal", "cloud", "plus", "arrow-up-tray", "folder-open", "printer", "calendar-days", "funnel", "chevron-right", "arrow-trending-up", "squares-2x2", "chevron-up-down", "map-pin", "adjustments-horizontal", "chart-bar", "arrow-right", "document", "minus", "arrow-path", "chevron-up", "x-mark", "cursor-arrow-rays", "sparkles", "folder", "chevron-left", "inbox", "pencil-square", "chevron-down", "arrow-down-tray", "clock", "information-circle", "check", or "presentation-chart-line".
  • class (:any) - Extra classes merged onto the root element. Defaults to nil.
  • Global attributes are accepted. Arbitrary HTML/phx-* attributes passed through.