mix phia.design.export (phia_ui v0.1.17)

Copy Markdown View Source

Export a saved PhiaUI design to HEEx or LiveView source files.

Takes a .phia.json file (created by mix phia.design or the MCP server) and generates production-ready Phoenix code.

Usage

mix phia.design.export my_design.phia.json
mix phia.design.export my_design.phia.json --format liveview --output lib/my_app_web/live/page_live.ex
mix phia.design.export my_design.phia.json --format heex --output lib/my_app_web/templates/page.html.heex

Options

  • --format (-f) — Output format: heex (default) or liveview
  • --output (-o) — Output file path (prints to stdout if omitted)
  • --module (-m) — Module name for LiveView format (default: MyAppWeb.DesignedLive)
  • --web-module — Phoenix web module (default: MyAppWeb)

Examples

# Quick preview — print HEEx to terminal
mix phia.design.export priv/phiaui_design/projects/dashboard.phia.json

# Generate a LiveView module
mix phia.design.export dashboard.phia.json \
  -f liveview \
  -o lib/my_app_web/live/dashboard_live.ex \
  -m MyAppWeb.DashboardLive