KinoPhoenixLiveView (kino_phoenix_live_view v0.1.3)

Provides a simple interface for launching a Phoenix LiveView within a Kino widget.

This module handles the configuration and startup of a proxy endpoint that serves your LiveView inside an iframe. It abstracts away the complexity of setting up a full Phoenix endpoint by offering a few preset option combinations.

Usage

Call KinoPhoenixLiveView.new/1 with one of the following option sets:

  1. Only Path (Use All Defaults)

    KinoPhoenixLiveView.new(path: "/proxy/apps/{slug}")
  2. Custom LiveView

    KinoPhoenixLiveView.new(path: "/proxy/apps/{slug}", live_view: MyApp.LiveView)
  3. Custom LiveView and Layout

    KinoPhoenixLiveView.new(path: "/proxy/apps/{slug}", live_view: MyApp.LiveView, root_layout: MyApp.Layout)
  4. Custom Router

    KinoPhoenixLiveView.new(path: "/proxy/apps/{slug}", router: MyApp.Router)
  5. Custom Endpoint

    KinoPhoenixLiveView.new(path: "/proxy/apps/{slug}", endpoint: MyApp.Endpoint)

Summary

Functions

Launches the Kino Phoenix LiveView integration with various configurations.

Functions

ed(path, opts \\ [])

ex(opts)

new(opts)

Launches the Kino Phoenix LiveView integration with various configurations.

The options you pass determine which integration variant is used.

Variants:

  • Only Path: Uses defaults for LiveView, layout, router, and endpoint.
  • Custom LiveView: Override the default LiveView module.
  • Custom LiveView and Layout: Override both LiveView and layout.
  • Custom Router: Provide your own router.
  • Custom Endpoint: Provide your own endpoint.

Note: Each call must include a :path key. Do not mix incompatible options.

tes(opts)