Build behaviour (Flow-Driven Development)
Screens
Design the pages of a website or app from widgets, like a design file: click them through, put them on whiteboards, and export them as plain HTML and CSS.
Open Systems in the appWhat screens are
A screen is one page of a website or app: a sign-in form, a list of orders, the details of one order. You build the screens of Web frontend and Mobile app systems from widgets instead of drawing them in another tool. Screens in the sidebar lists every screen, grouped by app; each of those systems also has a Screens tab with its screens, layouts and theme.
A screen is a design guide, as a page in a design tool is: it shows what the page looks like and where each button goes. A Sign in button goes to the *Welcome* screen; a link opens a popup. You can click the screens through, show them on a whiteboard, and hand them on as plain HTML and CSS. Nothing on a screen runs: no logic, no calls to APIs. The logic that does the work is built in the logic editor, and your team builds the real app from the design.
Each screen has a key such as SCREEN-WEB-LOGIN-001, and each widget on it has a key such as WIDGET-WEB-LOGIN-003.
Create a screen
- Open Screens in the sidebar and press New screen. With more than one Web frontend or Mobile app, pick the one the screen belongs to. (Or open the system's Screens tab and press New screen there.)
- The New screen dialog opens.
- Give it a Name and an Address, such as
/loginor/orders/:id: where it opens in the app. A part starting with:is filled in by what the screen is opened with. - Under Start from, pick Blank or one of the starters:
- Login: email, password and a Sign in button.
- Register: name, email, password and a Create account button.
- List and details: a list of items beside the chosen one.
- Form: fields with Save and Cancel buttons.
- Settings: tabs of switches and choices, and Save.
- Press Create and open. The screen editor opens.
Starters come without actions, so a new screen has no mismatch: pick where its buttons go on Actions.
Some flows in the Store bring screens too. Copying in Email & password login adds a *Sign in* and a *Welcome* screen to the client app, and Email & password registration a *Create account* screen.
Layouts
A layout is a frame several screens share, such as a header with a menu and a footer. Press New layout on the Screens tab, add the shared widgets, and put a Slot where each screen goes. Then pick the layout in a screen's Layout list in the toolbar. In the editor, the layout's widgets show faded around the screen.
Theme
Every screen of a system uses one theme: its colors, font, corner rounding and spacing. Press Theme on the Screens tab, change it, and press Save theme.
Style sheets from outside
A screen can use style sheets from the web, such as a font or an icon set. Add them on the system's Settings tab, under Style sheets: one https:// link per line. They load in the editor, in Preview and in the exported pages.
The screen editor
The editor takes the whole window, so the screen gets all the room. The back arrow at the top left returns to the system. The screen sits in the middle, with a drawer on each side:
- Middle: the screen as people will see it. Phone, Tablet and Desktop change its width.
- Left drawer: Widgets to add, and the Screen tree, every widget in order. Click a widget in Widgets to add it to the selected box, or drag it onto the screen. Move widgets with the arrows above the tree, or with Alt and the arrow keys.
- Right drawer, Properties: the selected widget's Look, Data and Actions. With nothing selected, the screen's own values. Selecting a widget opens it.
The buttons at the two ends of the top bar open and close the drawers. A drawer floats over the screen; its pin keeps it open beside the screen instead. Esc with nothing selected closes the drawers that aren't pinned. The editor remembers your drawers for next time.
Widgets come in groups: layout boxes (Column, Row, Grid, Card, Tabs, Popup), content (Heading, Text, Image, Icon, Divider), inputs (Text box, Text area, Number, Date, Dropdown, Checkbox, Radio group, Switch), data (List, Table, Empty state) and actions (Button, Link).
Per width. On a phone, widgets in a grid take the whole row and side-by-side rows wrap, on their own. While Phone or Tablet shows, some changes on Look apply to that width only: the width in a grid, the grid's columns, hiding a widget, stacking or wrapping a row. They win over what the width does on its own. Use the wider value undoes one. A widget hidden at a width stays on the canvas, faded, so you can still select it.
Press Save (Ctrl+S) to keep your changes. Undo and Redo work like in the logic editor.
Screen values and data
A screen keeps screen values: what is typed into a form, a list it loaded, a message to show. With no widget selected, the panel on the right lists Screen values (a name, a type and a starting value), Opened with (what another screen passes when it opens this one) and When the screen opens (actions that run first, such as setting a value).
On a widget's Data tab, you pick where each of its values comes from:
An input bound to a screen value writes what is typed into it. Each choice shows its type, and a choice that doesn't fit says so. Shown when and Can be used when hide or switch off a widget depending on a value.
Actions
On a widget's Actions tab, each event (such as *When clicked*, *When changed* or *When an item is picked*) has a list of actions that happen in order when you click the design through. There are six:
Actions only move between screens and change what the design shows. Choices, loops and calls to other systems belong in the logic, which is modelled on its own.
Mismatches
When something a screen points at changes, the screen gets a mismatch: a screen it opens that no longer exists, a screen value that was renamed, a value of the wrong type. Mismatches show as a red dot on the widget and in the screen tree, and as a count in the toolbar. Click one to select the widget and the tab to fix it on.
A screen with a mismatch shows on the system map, on the Screens tab, and fails the safety check of its system.
Accessibility warnings
The editor also warns, in amber, about what keeps a screen from working for everyone: a field without a label, an image without a description, a button without text, a heading that skips a size (Small right after Large), a button inside a list item you pick, and theme colors too faint to read where the screen uses them (contrast below 4.5:1). Select the widget: the warning is at the top of its Look tab. Warnings never fail the safety check or open a ticket. The theme editor lists the color pairs that are hard to read.
Preview
Press Preview (Ctrl+P) to click the screen through. Type into it and press its buttons: Go to screen, Go back and popups stay inside the preview, Set a screen value changes what shows and Show a message shows the message. Nothing else runs. The trail shows the screens opened, and Start again starts over. Phone, Tablet and Desktop change the width.
Back to editing returns to the editor.
Inspect and the design pack
Press Inspect (Ctrl+I) in the editor's toolbar to look at the screen as a developer building it would, as in a design tool. It shows a picture of the screen, with your unsaved changes, at Phone (390 px), Tablet (768 px) or Desktop (1200 px); In its layout adds the layout around it. Point at a widget to outline it and click to pin it: the panel shows its size, place, spacing, text and styles, naming the theme's values, and copies its CSS and its HTML. Hold Alt and point at another widget for the distance between them. Press Inspect again to go back to editing. For people who can only read the screen, Inspect is the main button.
Download design pack downloads a zip for building the screen by hand or with an AI assistant:
picture.png: how it looks, at twice the size for sharp edges.page.htmlandstyles.css: the screen as plain HTML, every widget with itsdata-key="WIDGET-…".layout.json: each widget's box (x, y, width and height in CSS pixels from the top-left) and its styles.tokens.json: the theme in the W3C design tokens format.screen.jsonandREADME.md: the screen itself, and how to use the rest.
A picture can't show what isn't drawn in it: a picture from another site that refuses to be copied is a grey box, and a font your computer doesn't have shows as the next font. README.md and the Inspect panel list what was left out.
Build screens with your AI assistant
A connected AI assistant drafts screens for you to review, like everything else it drafts: nothing changes until you accept them under Changes → From your AI assistant. AI prompts in the editor's toolbar, and on the system's Screens tab, copies a prompt for it:
- Build it in my code, pixel-perfect: it writes the screen in your project from its design.
- Make it look like my mock-up: you give it a picture; it drafts the changes, then looks at its own draft as it would be saved (the page and its sizes) and compares it with your picture before you review it.
- Make it work on phones and tablets: it looks at the screen at each width and drafts what each needs.
- On the Screens tab: Build a screen from my mock-up, Turn my app's pages into screens, and Build its screens in my code.
A draft has no picture of its own until you accept it: pictures are drawn in your browser.
Stored design pictures. Downloading the pack of a saved screen keeps its picture, as does putting the screen on a whiteboard and each release of its system (all three widths). Your AI assistant reads them with design, and rabbinatix design SCREEN-… writes them in a folder: see The rabbinatix CLI.
The code
Press Code in the editor's toolbar to see the HTML and CSS Export writes for the screen, with your unsaved changes. The screen's own page comes first, the selected widget's line marked; The other pages lists every other file.
Export HTML
On the Screens tab, press Export HTML and then Download zip to download how the screens look: one page per screen (the screen the app opens on is index.html), each with its layout around it, and one styles.css with the theme. Open index.html in a browser, or put the folder on any web host.
- Each page shows its screen as it opens: values at their starting values, and what is hidden at the start is left out.
- There is no JavaScript. A button, link, image or list item that goes to another screen is a link to that screen's page. Nothing else runs.
- Widgets keep their
data-key="WIDGET-…", andfdd-screens.jsonsays which page and line each is on, so code built from the design leads back to the screen.
Keep your code in step
When a screen changes later, open it, select nothing, and open History in the right-hand pane. Compare an older saved state, then press Copy changes for your assistant: it copies which widgets changed, by key, so your AI assistant changes only those parts of your code. A connected assistant can ask for the same list itself (see Your AI assistant).
Related
- LogicBuild what a system does by connecting nodes on a canvas: endpoint logic for an API, event logic for a user action, and functions you reuse.
- FlowsBuild a flow from the logic it starts at, see it cross your systems in lanes, and move it from draft to verified.
- Test cases and runsWrite test cases as acceptance tests, run the flow and watch it move through your systems, step back in time, and compare runs and versions.
- Code generationSee the code for a logic as you build it, take it away as files, and check it returns what the test cases returned.
- Test data and expected resultsTest data stands in for databases, APIs and inputs that don’t exist yet; expected results describe the result you expect.
