PhoenixAssetPipeline.Components (phoenix_asset_pipeline v2.0.2)

Copy Markdown View Source

Phoenix components backed by the asset manifest.

Summary

Functions

Renders an SVG <use> icon from a manifest-backed sprite.

Renders an AVIF/WebP/PNG <picture> set from a manifest-backed image base path.

Functions

class_names()

icon(assigns)

Renders an SVG <use> icon from a manifest-backed sprite.

Attributes

  • class (:any) - Defaults to nil.
  • name (:string) (required)
  • sprite (:string) - Defaults to "icons.svg".

picture(assigns)

Renders an AVIF/WebP/PNG <picture> set from a manifest-backed image base path.

Attributes

  • alt (:string) (required)
  • class (:any) - Defaults to nil.
  • decoding (:string) - Defaults to "async".
  • fetchpriority (:string) - Defaults to "high".
  • height (:string) (required)
  • id (:string) (required)
  • img_class (:any) - Defaults to nil.
  • loading (:string) - Defaults to nil.
  • phx_update (:string) - Defaults to "ignore".
  • src (:string) (required)
  • width (:string) (required)