MbtaMetro.Components.Icon (MbtaMetro v1.1.2)

View Source

A component that renders an SVG icon, from FontAwesome, a bespoke Metro collection, or a custom collection provided by the client.

An icon can be pulled in like

<.icon type="solid" name="thumbs-up" class="size-6" />

type indicates which icon pack the icon comes from, name indicates the specific icon. Other properties (including class) are passed directly to the svg component.

See icon/1 for more information.

Summary

Functions

icon(assigns)

Attributes

  • name (:string) (required)
  • type (:string) - Defaults to "solid". Must be one of "custom", "brands", "metro", "regular", "solid", or "system".
  • Global attributes are accepted.

icons()

names()

types()