Skip to Content
GuidesMockups

Mockups

A mockup is a page a chat makes to show a design idea. It doesn’t wait for a preview, so it appears the moment it’s written. Mockups let you compare a few options side by side with the running app before anything is built.

Ask a chat for it in your own words, for example “sketch three takes on the empty cart as mockups”. The chat writes each take as its own mockup, and when you ask for changes it rewrites them in place. Or draw one yourself with the Mockup tool and say what goes in it.

An ‘Option A · Toggle’ pricing mockup beside the live mobile pricing page, with both options listed with their own icon in the layers list

Drawing one

The Mockup tool (M) in the bottom toolbar draws a box where you drag, or a 1280×800 one where you click. As you let go, it asks what the mockup should show, the same way a drawn frame does. Type what to sketch and press Enter. The box’s size goes along as a loose hint, so a phone-sized box gets a mobile take without the agent fussing over the exact pixels; a box that matches a device size, like a click’s 1280×800, names that screen.

  • The chip beside Send says which chat sketches it. With nothing selected it’s New chat, which starts a new chat on a repository. If you had a frame, mockup or document selected when you drew, it’s that layer’s chat. Click the chip to switch.
  • The chip also offers New chat, no repository and any chats with no repository: they write mockups and documents but no code. On a canvas with no repository that’s the only kind, so the chip reads New chat and a new one sketches it in the agent panel.
  • Sending puts an empty mockup in the box, owned by that chat. It shows Sketching until the chat writes its page, then the page appears in place, at the size you drew. Your sent message names the mockup; click the name to select it, and the canvas pans to it if it’s off screen.
  • To show a mockup you already have instead, click Open mockup beside Send (or press ⌘ O). The card turns into a search of the canvas’s mockups, starting from what you typed. Pick one and the box shows it, at the size you drew, as another view of the same mockup; nothing is sent. New mockup… or Esc takes you back to the question with your words. The button shows only when the canvas has a mockup.
  • Press Esc or click elsewhere to skip the question. The box disappears, and nothing is left on the canvas.
A mockup box just drawn, asking what it should show, with the New chat chip beside the Send button

In the chat

Every mockup a chat makes or changes shows in its reply as a square tile, two to a row: a preview of the page on top, and its icon and name under it. Click a tile to open the mockup in a window over the canvas, at its full size whatever the canvas zoom, with the page running, so its knobs, links and picks work as they do on the canvas.

The chat decides whether a mockup also goes on the canvas. A take meant to sit beside the running app goes on the canvas; a page meant to be used at full size, like a page of options to pick from, stays in the chat. To put one on the canvas yourself, choose Add to canvas from ⋯ on its tile (it shows when you point at the tile) or in the window’s title row: the mockup lands beside the chat’s other layers, selected, with the canvas following it. Or drag the tile onto the canvas: dropped on a group it joins that group where you let go, and dropped on empty canvas it starts a group of its own there. Dropped on a document’s text, it’s embedded in the document there. Or ask the chat to put it there. Show in Files on the tile’s ⋯ opens Files at the mockup.

A name the chat writes in its reply opens the window for a mockup that isn’t on the canvas, and selects the mockup on the canvas for one that is.

Where mockups sit

A mockup you drew stays where you drew it. Mockups a chat puts on the canvas land here:

  • Beside a frame. A chat’s first mockup joins the group of its chat’s frames, so the live page and the options read left to right in one row.
  • Beside each other. Every later mockup from the same chat joins the group of its previous one.
  • On their own. When the chat has no frame on the canvas yet, its mockups get a group of their own.

Which chat changes it

Any chat can change any mockup, whichever chat drew it, so you can ask the chat you’re talking to to take a mockup further. Once a chat starts reading or changing a mockup, it holds it until it finishes: another chat that tries to change it tells you who has it and carries on with the rest of its work, so two chats never overwrite each other. Every mockup remembers the chat that changed it last. Its page, Ask the agent to add a knob and Send to chat talk to the chat changing it right now, or else to that one. From the moment a chat starts reading or changing a mockup, its label names that chat with the working dots, and the mockup’s row in the sidebar ends in the same dots; both go when the chat finishes. Otherwise the label shows only its title. A group’s label names a chat only for the frames in it, so a group of mockups names none.

Building one

When you’ve picked a take, ask a chat to build it, for example “build take 2”. The chat reads that mockup’s page, builds it into its own code using your app’s real components, and checks the result in its frame against the mockup. Its reply sums up the decisions it built from: the take you picked, your answers to its questions and the changes you asked for along the way. The mockup stays on the canvas, so the take and the live page can sit side by side.

There’s no Build button: you ask in the chat, in your own words. How many takes the chat draws and how many rounds it goes through are up to the conversation.

Working with mockups

Mockups are layers like frames and documents. You can select, move, resize, rename and remove them, group them with other layers, and find them in the layers list with their own icon.

Each mockup is a file, and a mockup on the canvas is a view of it. One file can have several views, all showing the same page, or none at all. Delete removes only the view you selected, and ⌘ Z brings it back. A file whose last view goes stays in Files, marked Not on canvas, and chats and mentions still name it.

Mockup options (⋯), at the end of the bar under a selected mockup, holds Rename, Duplicate, Duplicate as new file, Device size, Fit to content, Remove from canvas and Delete file, the same menu as the mockup’s row in the layers list.

  • Duplicate (⌘ D) adds another view of the same file at the end of the mockup’s group. A change to the page shows in both.
  • Duplicate as new file makes a copy with the same page and files, size and chat, its name ending in “copy”, that you can change on its own.
  • Remove from canvas takes away this view, as Delete does.
  • Delete file deletes the mockup and every view of it at once, with no confirm. One ⌘ Z brings them all back. A mention of a deleted mockup shows its name struck through and opens nothing.

Mockups take a frame’s sizes: Device size sets one of the same device presets, dragging a corner snaps to them (hold

⌘ to resize freely), and Fit to content, a toggle, keeps the mockup’s height on its whole page while you set the width. You can turn it on before the chat has written the page, and the height follows once it has.

Clicking a mockup selects it rather than using the page. To click through it, press Interact under the selected mockup, as on a frame: the page takes your clicks, scrolls and typing, and Esc or a click outside the mockup returns to the canvas. Double-clicking a mockup opens it in a window at its full size, the same window as its tile in the chat. A mockup has no address bar or reload. Mockups aren’t chat targets. A chat writes every mockup’s page, including the ones you draw.

You can still point at part of one. In the chat that changed it last, click the composer’s crosshair and then an element in the mockup, as you would in a frame (see Targeting an element). Mockups other chats changed last dim while you pick. The Coordinator’s crosshair picks in any mockup and passes the element on to its chat.

Knobs and shared state

A selected mockup shows Interact and Knobs buttons under it, like a frame’s. When the chat gives its page knobs, the button opens them: sliders, switches, text fields, selects and color pickers that change the page as you drag, for everyone on the canvas. With none yet, Ask the agent to add a knob opens the chat that changed the mockup last with a request started. For a mockup no chat changed, or when that chat was deleted, it opens the chat the agent panel is showing instead, or a new chat with no repository when the panel shows the Coordinator.

A mockup’s page can also share its state, such as the open tab or what’s in a cart, so everyone looking at it sees the same thing as you click through it in Interact.

A mockup’s scroll position syncs the same way, as a frame’s does: when someone scrolls the page, everyone’s copy follows, and the mockup opens, and reloads, where it was scrolled to.

Pictures, data and templates

A mockup is a folder: its page and the files it loads beside it, like a data script, a stylesheet or screenshots the agent took of your app. The page loads them by their path in the folder (data.js, captures/home.png), from its markup or its scripts, and when the chat rewrites any of them, the mockup reloads for everyone on the canvas. A mockup’s folder holds up to 25 MB.

A page can also load a script or stylesheet from a skill, like a page template’s shared code that many pages use. A file from a skill comes from the skill of that name your chats would use, in the usual order: the repository of the chat that changed the mockup last, then the canvas’s, your account’s and the built-in one. Pages made before mockups had folders may still name a picture from the canvas’s files; those keep showing.

A file the page names that isn’t there shows as an empty picture, and the rest of the page works as before.

A deleted mockup keeps its folder while ⌘ Z can still bring it back. Once you leave the canvas, the folder is gone for good.

Answering on the page

When a chat asks you a question about a mockup, the question names the mockup under it, and clicking the name brings the mockup into view. Any chat can ask one: the chat that changed the mockup last, the Coordinator or another chat. The mockup’s page can show the same question and its options, so you can pick one where you see the designs.

The pages the design skills make open on the finding or question the chat asked about, and your picks stay on the page until you’re done: change them as often as you like, then press Send to chat. That puts every pick in one message in the composer of the chat that asked, in the same words Copy picks gives you, and sending it answers the question. The question in the chat still works too, and an answer there shows as your pick on the page, including one a teammate gave.

A page only speaks when you click or press a key on it in Interact; it can never send anything on its own, and the agent using the mockup can’t answer for you. On a live mockup, whoever has control speaks for everyone, and every viewer’s page shows the same picks. While nobody has control, or while the agent has control of a mockup, a pick stays on the page, which says to answer in the chat.

Sending your reaction from the page

A mockup’s page can hand you a message to send to its chat. A decision page, for example, may have a Send to chat button that sums up your picks and notes. Pressing it opens the chat that changed the mockup last, or the chat whose question about it is still open, and puts the message in its composer, after anything you had already typed, with the caret at the end. Edit it as you like, then send it. Nothing is ever sent for you.

A From row at the top of the composer names the mockup the message came from, and when you send, the chat is told which mockup it was written on. The row’s X removes it and keeps the text. When no chat on the canvas changed the mockup, the message goes to the chat the agent panel is showing, as Ask the agent to add a knob does.

A page can only do this from your own click or key press while you Interact with it, or while you have control of a live mockup, so a page can never write a message on its own. The chat writes such a page with screenplay.draft(text).

A mockup’s Send to chat button has put “Picked B. Note on A: the illustration is too big for mobile.” in its chat’s composer, under a From row naming the mockup

Going live

On a hosted canvas, a mockup starts as your own copy, running in your browser, like a frame. To look at the very same page together, click Go live (the broadcast button after Interact under the selected mockup). Going live works as it does on a frame: it happens for everyone on the canvas. The mockup’s page opens in one browser in a chat’s sandbox, everyone’s copy switches to it, and the title line reads Live. Anyone who opens the canvas while the mockup is live lands on it live.

A mockup has no code of its own, so it borrows a chat’s to run in: the code of the chat that changed it last, or another chat’s running code when that one isn’t running. With no chat’s code running, Go live is disabled and its tooltip says The chat’s code has to be running.

On a live mockup, whoever has control is the only one whose clicks, keys and scrolling reach the page, and others can ask for control, as on a live frame. When the chat rewrites the mockup, the live page shows the new version for everyone. Its Knobs gain the same Theme knob as a live frame’s.

Click Go live again to end it for everyone: each of you is back on your own copy. What the live page held only in memory, like a half typed form, doesn’t come along. The desktop app has no Go live.

The agent using a mockup

A chat’s agent can click through a mockup for you, the way it uses a frame: ask a chat to show you how a take behaves, or to get it into a state. It reads the page’s buttons and fields, clicks, types and scrolls, and looks at the mockup after each step. This works in the browser and in the desktop app, from a chat on a repository or a chat with no repository.

  • It uses your copy. The steps happen in the mockup on the canvas of the person who asked. Everyone else keeps their own copy, as when you click through it yourself.
  • The canvas has to be open. The agent works only while the canvas is open in your browser or the desktop app. With it closed, the agent says so in the chat instead.
  • A live mockup is the exception. On a live mockup the agent uses the one live page, so everyone on the canvas watches each step, and it works with nobody’s canvas open.
  • It shows the same signs as a frame. Agent has control sits on the mockup’s title line, an unselected mockup gets a ring, the Interact button shows the agent’s dots, and the mockup has no resize handles while the agent has control.
A mockup with the Agent has control tag on its title line and a dark ring around it
Not selected: the tag and the ring.
A selected mockup the agent controls, with the Agent has control tag on its title line, the agent’s dots on the Interact button and no resize handles
Selected: the agent’s dots, and no resize handles.
  • You can take over at any moment. Click the Interact button (its tooltip says Click to take control), and the agent stops at once and asks before it carries on.

In the browser, the agent’s clicks and keys on your own copy are simulated inside the page, so it can’t open a file picker, use the clipboard or move the keyboard focus. When a step needs one of these, it asks you to do it. It can hover: tooltips and menus that open on hover do, and the mockup’s hover styles show. In the desktop app its clicks and keys are real input, as on a frame, so focus, typing and the clipboard work too.

Safety

A mockup’s page runs in a locked-down frame: it can run its own scripts, but it can’t reach Screenplay, your session or the rest of the canvas, and it doesn’t load anything from the network but its own folder: the files and templates a page names come from the canvas, never from anywhere else. A live mockup runs locked down the same way, in its chat’s sandbox.

Last updated on