Help articles

Parts: Declare vs implement (Studio v2)

This page documents the Studio v2 parts system, which was removed in Studio v3. For current plugin authoring, see Developing plugins.

How parts are defined also defines how they behave.

An implementable part is defined by setting a name and a description. It should not have a path set. If you find yourself wanting to set a path, you probably want to do the following:

[
  {
    "name": "part:foo/bar",
    "description": "Some really good description"
  },
  {
    "implements": "part:foo/bar",
    "path": "./some/part.js"
  }
]

A non-overridable part can be defined by setting a name and a path in the same declaration:

{
  "name": "part:@sanity/base/schema",
  "path": "./some/schema.js"
}

Was this page helpful?