# `mix phia.design.export`
[🔗](https://github.com/charlenopires/PhiaUI/blob/v0.1.17/lib/mix/tasks/phia.design.export.ex#L1)

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

## Related Tasks

- `mix phia.design` — visual editor
- `mix phia.design.mcp` — MCP server for Claude Code
- `mix phia.design.analyze` — analyze a design file

---

*Consult [api-reference.md](api-reference.md) for complete listing*
