Design systems
A design system is a component library that canvas apps can import and render with. With one set up, the agent builds prototypes from your real components and themes, and the canvas editor offers prop controls for them. Without one, apps use plain React and CSS.
Every organization has the built-in @inspect/ui design system. You can add your own libraries next to it.
Requirements
- Canvas enabled for your organization.
- The Manage design systems role (or Admin) to set up, publish, enable, disable, or choose the default. An admin grants it in Users and roles.
- For setup, the repository that contains your component library, added to Inspect. See Repositories.
Set up a design system
- Go to
https://app.inspect.com/settings/canvas-design-systemsand select Set up design system. - Choose the Repository that holds the library, or a representative app that uses it, and select Start setup.
- Inspect starts a session that follows the built-in
setup-canvas-design-systemskill. The agent packages your library: a definition (which imports apps may use, the themes, the guide agents read, and per-component editing metadata), agent-facing metadata about each export, and a single-file runtime bundle with the components' styles, fonts, icons, and providers. - The agent verifies rendering and editing against the build, then publishes a version with a description.
Setup also saves an Inspect skill named canvas-design-system-<library> (for @acme/ui, canvas-design-system-acme-ui). It holds the integration's sources, nothing is committed to your repository, and later updates start from it. To update, open the design system's page and ask for the change, for example a new library version or a fix to component notes and props. A routine refresh with unchanged inputs doesn't publish a new version.
Keep authentication, backend calls, and application services out of the design system. Apps on the canvas have no access to your repository or its installed packages, only to what the bundle contains.
Versions
Published versions are named <library version>-canvas.<revision>, for example 4.2.0-canvas.3. The revision increases when the package changes but the library version doesn't. A published name@version can never be replaced; every upload needs a new version.
- Bundles up to 20 MB.
- Metadata files up to 10 MB.
- Descriptions up to 500 characters.
The bundle must be one ES module. React and React DOM are supplied by the canvas and must not be bundled.
How canvases pick a version
Each canvas renders one version per design system, pinned the first time an app on that canvas uses it.
- New revisions of the library version a canvas already uses apply to it automatically.
- Make current version changes which library version newly pinning canvases get. Canvases already pinned keep their library version until someone asks the agent to update the canvas to the current version. That update affects every app on the canvas that uses the design system.
- Built-in design systems always render with the version Inspect currently ships, whatever version a canvas pinned.
Default and choosing between design systems
Use for new apps makes a design system the organization default. New apps start with its current version, and agents build with it unless the request or the task calls for another one. Changing the default doesn't touch existing apps. You can also have no default.
Agents choose among design systems by their descriptions. Write the Description as one or two sentences: what the library is, which product or brand it's for, and when agents should or shouldn't use it. It applies to every version. Clear it to restore the default.
Disable a design system
Disable hides a design system from agents choosing one for new apps or for canvases that don't use it yet. Canvases that already use it keep rendering and can still be edited. You can't disable the default; choose another default first. Enable reverses it.
Edit the guide
Each version has a guide: the instructions agents read before building with it, such as which components to prefer and how to compose layouts. People with the Manage design systems role can edit the guide on the design system's page. Edits are versioned; Guide history compares earlier versions with the editor and can restore one. The latest saved edit replaces the guide that shipped in the package. Built-in design systems don't show a guide editor.
Themes
A design system can ship several themes. Each app picks one; when it doesn't, the design system's default theme applies. Light and dark color mode is set per canvas, separate from the theme.
Troubleshooting
Ask an admin for the role, then start the setup session again.
Publish from a writable session.
Reduce what the bundle includes, then publish a new version.
The definition's default theme isn't in its list of themes. Fix the definition and publish a new version.