LightningWeb.ChannelLive.Helpers (Lightning v2.19.0-pre)

View Source

Shared helpers for channel LiveViews.

Summary

Functions

Renders a clickable proxy URL that copies to clipboard on click.

Functions

channel_proxy_url(channel_id)

proxy_url_copy(assigns)

Renders a clickable proxy URL that copies to clipboard on click.

The entire element is a button — clicking anywhere copies the URL. Accepts :leading and :trailing slots for icons or other content flanking the URL text.

Attributes

  • :id - Required. Used for the button and tooltip element IDs.
  • :channel_id - Required. The channel whose proxy URL to display.
  • :class - Extra classes for the outer button element.
  • :text_class - Extra classes for the URL text span.

Slots

  • :leading - Content rendered before the URL text (e.g. an icon).
  • :trailing - Content rendered after the URL text (e.g. a copy icon).

Attributes

  • id (:string) (required)
  • channel_id (:string) (required)
  • class (:string) - Defaults to nil.
  • text_class (:string) - Defaults to nil.

Slots

  • leading
  • trailing