Dala.Preview.Live (dala v0.0.11)

Copy Markdown View Source

Standalone Phoenix LiveView server for Dala Preview Designer.

Starts a complete Phoenix endpoint serving the interactive drag-and-drop design canvas at http://localhost:<port>/. The canvas lets you:

  • Drag components from a palette onto a design canvas
  • Edit component properties in a sidebar
  • See a live phone-frame preview
  • Generate screen module code in DSL style

Usage

# Start with default settings
Dala.Preview.Live.start_server()

# Start with a specific port
Dala.Preview.Live.start_server(port: 4200)

# Start with an initial UI tree
Dala.Preview.Live.start_server(ui_tree: my_tree, port: 4000)

Summary

Functions

Start the standalone LiveView server.

Stop the LiveView server.

Functions

start_server(opts \\ [])

Start the standalone LiveView server.

Options:

  • :port - Port to run on (default: 4200)
  • :ui_tree - Initial UI tree map (default: empty column)
  • :module_name - Default module name (default: "MyApp.HomeScreen")
  • :open - Open browser after start (default: true)

stop_server()

Stop the LiveView server.