Design Systems
Libraries
A library is an ordinary Nox file that other files link to. Keep your buttons, cards, colors and type in one file, link it from every project file, and place its components there. When the library changes, each file sees the updates and takes them when it is ready.

How a library works#
What you use from a library is copied into your file and remembers where it came from. That has three effects:
- Your file is whole by itself. It opens and exports with the library elsewhere or gone.
- Updates are never applied by themselves. Nox lists what differs and you choose.
- A library's sets of variables come in whole when you link it, so its modes work in your file at once.
A library offers its components. Those whose names begin with . or _ are kept private: use that for helper parts that only other components need.
Link a library#
- Open Libraries on the rail and click the plus.
- Choose the library's
.ndffile. - Click the library's line to open it and see what it offers.
Link ~/Design/Core.ndf as a library and tell me what it offers.
The agent calls libraries with the absolute path of the file:
{"action": "link", "path": "/Users/you/Design/Core.ndf"}
and then lists the libraries linked, whether each file is found, how many updates wait, and the components on offer:
{"action": "list"}Use its components#
- In the Libraries panel, click a component under the library. Nox places an instance in the middle of the view. The component is copied into your file the first time, with all it needs.
- From then on it is also in Components and Insert (I) like any other.
An instance of a library's component says so in the inspector's header, such as Instance · Core. To see the original, right-click the component in the panel and choose Open "Button" in Core.
Use the Button from the Core library for the three actions on this screen.
The agent calls libraries to copy the component in:
{"action": "place", "component": "Button"}
The reply gives the id of the local copy. The copy brings what it needs: the rest of its set, components nested in it, its styles and variables. The agent then makes instances of it with create_nodes, as of any component:
{"nodes": [{"kind": "instance", "component": "LOCAL_COPY_ID", "x": 24, "y": 24}]}
To look before placing, it calls find with {"in": "library", "name": "Button"}.
Overrides, properties, variants and slots work on these instances as on any other. See Components and instances.
Updates#
When the library's file changes, the panel says how many things differ.

- Click the library's menu button and choose Check for Updates, or Review Updates… when the panel shows a count.
- The sheet lists each copied thing that differs, such as
Button — 2 changed, 1 added, with a picture of it here and as the library has it now. It sayschanged here toowhere you edited the copy in this file. - Untick what you do not want and click Update.
Each update is taken in place, so instances keep their overrides. The file as it is now is kept as a version first, and the whole update is one step of undo.
Check the Core library for updates and show me what changed before applying anything.
The agent calls libraries to see what differs:
{"action": "check"}
and, once you agree, applies all of them, or only those named in ids:
{"action": "update"}Read the list before you update a file that is about to ship. A changed padding in a library's button moves every screen that uses it.
Moving and unlinking#
The library's menu also has:
- Show in Finder: where the file is.
- Point to Another File…: for the same library moved or copied. Use it when the panel says
not found. For an agent,{"action": "point", "path": "…"}. - Unlink: what the file uses stays, as its own components, styles and variables. They no longer take updates. For an agent,
{"action": "unlink"}.
A good library file#
- One page for components, with every set laid out and named
Button,Card,Field. Names are how people and agents find them. - Variables in sets with modes (
Theme: Light, Dark), named by role. See Variables and modes. - Styles that follow those variables. See Styles.
- Private parts named with a leading
.or_. - Change it on purpose. Every linked file will be offered the change.