View Source Lume.Components.Icon (lume v0.2.0)

Renders a Heroicon.

Originally from https://github.com/phoenixframework/phoenix

Heroicons come in three styles – outline, solid, and mini. By default, the outline style is used, but solid and mini may be applied by using the -solid and -mini suffix.

You can customize the size and colors of the icons by setting width, height, and background color classes.

Icons are extracted from the deps/heroicons directory and bundled within your compiled app.css by the plugin in your assets/tailwind.config.js.

Examples

<.icon name="hero-x-mark-solid" />
<.icon name="hero-arrow-path" class="ml-1 w-3 h-3 motion-safe:animate-spin" />

Summary

Functions

This is copied from the default CoreComponents.icon/1 but enhanced to handle both string and list classes

Functions

icon(assigns)

This is copied from the default CoreComponents.icon/1 but enhanced to handle both string and list classes

Attributes

  • name (:string) (required)
  • class (:any) - Defaults to nil.