Canvas & Layout
Frames, shapes and text
Everything on a Nox page is a node: a frame, a shape, a text, a group. Frames hold the others and become your screens, cards and buttons. Learn these few kinds well and the rest of Nox (layout, components, variables) is a property you add to them.

The tools and their keys#
The tools sit on the top bar in Design (⌘1), after the modes. Press a key, then drag on the canvas.

| Tool | Key | What it makes |
|---|---|---|
| Move | V | Nothing: it selects, moves and resizes |
| Frame | F | A frame: a screen or a container |
| Rectangle | R | A rectangle |
| Ellipse | O | An ellipse or a circle |
| Line | L | A straight line |
| Arrow | ⇧L | A line with an arrowhead |
| Pen | P | A path, anchor by anchor |
| Text | T | A text |
| Insert | I | An instance of one of the file's components |
| Measure | M | Nothing: it reads sizes and distances |
Triangle, Polygon, Star and Curve have no key. Open the shapes' button (the one with a chevron) and choose them there.
Frames are screens and containers#
A frame has its own background, its own corner radius, and children. A frame directly on the page is a screen. A frame inside a frame is a container: a card, a row, a button.
With the Frame tool in hand, a strip of sizes appears: iPhone (390 × 844), iPad (820 × 1180), Mac (1440 × 900), 1080p, 1440p, more screens for games, Icon and Custom. A click on one makes a frame of that size in the middle of the view, with its safe area where the screen has one. Start every screen from a real size: text sizes and tap targets only mean something against it.
A child's X and Y are measured from its frame's top-left corner, so moving a frame moves everything in it.
- Press F and drag a frame, or choose a size from the strip.
- Press R, O or T and draw inside it. What you draw inside a frame becomes its child.
- To wrap things you already drew, select them and choose Arrange › Frame Selection (⌥⌘G).
Ask for the frame and its children in one go. Positions are relative to the parent.
Make a 390 × 844 screen called Home with a white background, a 24 pt bold title "Today" at 24, 64, and a rounded blue card under it.
The agent calls create_nodes:
{
"nodes": [
{
"kind": "frame", "name": "Home", "x": 0, "y": 0, "width": 390, "height": 844, "fill": "#FFFFFF",
"children": [
{"kind": "text", "text": "Today", "x": 24, "y": 64, "font_family": "Inter", "font_size": 24, "font_weight": 700, "fill": "#111318"},
{"kind": "rectangle", "name": "Card", "x": 24, "y": 112, "width": 342, "height": 160, "corner_radius": 20, "fill": "#2F6BFF"}
]
}
]
}Clipping#
A frame can cut off what reaches past its edges. Turn clipping on for cards with a picture that bleeds, for lists that scroll, and for every screen, so stray layers do not show in an export.

By hand: select the frame, open More under the size fields in the inspector, and switch on Clip what is outside it. For an agent it is clips_content: true.
Corner radius and smoothing#
The Corner section has one Radius field. The button beside it opens the four corners, so a sheet can be round at the top and square at the bottom. Smoothing is under More, below the size fields, and runs from 0 to 100%. At 0 the corner is a quarter circle. At 60% it is the continuous corner of iOS icons: the curve begins earlier along the sides and eases in. Use it on large surfaces (app icons, cards, sheets) where a plain arc looks pinched.

An agent sets corner_radius to one number or four (top-left, top-right, bottom-right, bottom-left) and corner_smoothing from 0 to 1:
{"nodes": [{"kind": "rectangle", "x": 0, "y": 0, "width": 112, "height": 112, "corner_radius": 32, "corner_smoothing": 0.6, "fill": "#2F6BFF"}]}
Text boxes#
A text sizes itself in one of three ways. Choose on purpose, because it decides what happens when the words change.

- Auto width. Click with the Text tool and type. The text is one line, as wide as its words. Use it for labels and buttons.
- Auto height. Drag with the Text tool. The text is as wide as the drag, the words wrap, and it grows downward. Use it for paragraphs.
- Fixed. A width and a height of its own. Lines that do not fit can be cut with an ellipsis, or the text can shrink to fit (see Pins and resizing).
Under More in the Text section, a segment switches between Auto height and Fixed height, a menu cuts the text (Not cut, To its height, or 1 to 5 lines), and Top, Middle, Bottom place the lines in a box taller than they are. You can also type auto in the H field to make a text as tall as its lines again.
For an agent: no width is auto width; a width alone wraps and grows; width and height make a fixed box. text_truncate: true cuts it, and max_lines says after how many lines.
{"nodes": [{"kind": "text", "text": "Ship the release notes before the Friday review.", "x": 0, "y": 0, "width": 260, "height": 22, "text_truncate": true, "font_family": "Inter", "font_size": 16, "fill": "#111318"}]}
Groups#
A group (⌘G) holds nodes together and nothing more. It has no background, no padding and no size of its own: it is as large as what is in it. Ungroup with ⇧⌘G.
Use a group to move a logo's parts as one. Use a frame when the container needs a fill, a radius, clipping or a layout. If you are not sure, use a frame.
A frame is drawn only if it has a fill or a stroke. An agent that makes a frame with no fill has made an invisible container, which is right for a row and wrong for a card.
Next: let frames place their own children with Auto layout.