Files, groups and frames
A Wonderblok file holds two boards. The app board has your screens, sorted into groups. The components board has the pieces you reuse.
Files
Everything you design lives in a .wonderblok file on your device. Your agent finds the files that are open in Wonderblok with list_files, and can open any other .wonderblok file by its path. When only one file is open, or when you want the one in front, the agent can leave the file argument out.
Boards
- app
- Your screens. Every top-level layer on this board is a frame.
- components
- Your reusable pieces. Every top-level layer here is a component. An instance shows it anywhere, and changing the component updates every instance.
To turn a layer you already drew into a component, your agent calls create_component. The layer moves to the components board and an instance takes its place.
Groups
Split the app board into groups by module or topic, for example Onboarding and Checkout. Once a file has groups, every top-level frame belongs to one. In the app, use the Groups list to add, rename and reorder groups, and drag frames onto a group to move them.
- Your agent adds, renames and deletes groups with
set_group. A group that still holds frames cannot be deleted. - It moves a frame to another group with
update_nodeand agroupproperty. A new frame goes on the first group unless the agent names another. get_treelists frames under their group, and can show a single group.
Frames and layers
A layer is a frame, text, icon, rectangle, ellipse, shape, path, instance or image. Frames lay out their children horizontally, vertically or freely. Every layer has an id that stays the same and is unique across the file, and your agent can add its own key to a layer so that repeated imports update it instead of duplicating it.
group g1 "Onboarding" (2 frames) frame a1b2 "01 Welcome" at=0,0 size=390x844 text c3d4 "Title" text="Fresh coffee, your way." frame e5f6 "Actions" frame g7h8 "02 Location" at=470,0 size=390x844revision 12A link on any layer points at another layer on the app board. In Preview, tapping it opens the frame that holds that layer, which is how you get a clickable prototype. A screen can also have empty, loading, error and success versions, which your agent adds with add_state.
Your agent never edits the file directly. Every change goes through Wonderblok's tools, which validate it first. Sync and merge explains how the app and agents take turns.
Was this page helpful?
Edited Nov 8, 2026