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.heexOptions
--format(-f) — Output format:heex(default) orliveview--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.DashboardLiveRelated Tasks
mix phia.design— visual editormix phia.design.mcp— MCP server for Claude Codemix phia.design.analyze— analyze a design file