View Source LiveInspect (live_inspect v0.1.0)

Inspect LiveView assigns directly in the browser.

installation

Installation

LiveInspect is a developer tool that should never be used in a production environment, so be sure to specify the :only option when adding it to your deps in mix.exs:

def deps do
  [
    {:live_inspect, "~> 0.1.0", only: :dev}
  ]
end

usage

Usage

Just call the live_inspect/1 function component with any values to examine.

<LiveInspect.live_inspect my_assign={@my_assign} my_other_assign={@my_other_assign} />

configuration

Configuration

# Default configuration
config :live_inspect, theme: LiveInspect.Theme.Light

themes

Themes

The styling of the inspector is controlled via themes. Two themes are provided with the library:

See LiveInspect.Theme to implement a custom theme.

Link to this section Summary

Functions

Function component wrapper for the LiveInspect.Inspector component.

Link to this section Functions

Function component wrapper for the LiveInspect.Inspector component.

example

Example

<LiveInspect.live_inspect my_assign={@my_assign} my_other_assign={@my_other_assign} />

attributes

Attributes

  • :id - optional; defaults to "live-inspect"

All other assigns are put into a map and passed as the value attribute to LiveInspect.Inspector.