Blueprints

Application Blueprints reference

Field reference for defineApplication and the application view definers: window, panel, tile, asset source, and web worker.

Field reference for defineApplication and the view definers in @sanity/blueprints 0.26.0 or later. Declare views in the application's views array and web workers in its webWorkers array. For a walkthrough, see Define an application with Blueprints.

Beta

defineApplication

Groups your app's views and web workers into one deployable resource. An application must declare at least one view, and at most one window view.

  • Requiredname

    string

    The resource name. Unique within the blueprint, and how Blueprints matches the resource between deploys. Changing it destroys the application and creates a new one.

  • slug

    string

    The application's hostname. Use lowercase letters, numbers, and hyphens, and start and end with a letter or number. Defaults to name. Changing it destroys the application and creates a new one.

  • Requiredtitle

    string

    Label shown on the Dashboard dock button.

  • Requiredroot

    string

    The application directory, relative to the blueprint file. It contains the application's package.json, and every view and web worker src is resolved relative to it.

  • icon

    string

    Path to an SVG icon for the application.

  • visibility

    default | unlisted | disabled

    Dashboard visibility. The default is default.

  • views

    array

    The application's window, panel, tile, and asset source views, declared with the view definers. Include at least one view, and at most one window view.

  • Background web workers, declared with defineWebWorker.

View definers

Declare each view in the application's views array, and each web worker in its webWorkers array. Every view definer and defineWebWorker share these fields:

  • Requiredname

    string

    Unique within the application. Use letters, numbers, hyphens, and underscores.

  • Requiredtitle

    string

    Display title for the view.

  • Requiredsrc

    string

    Path to the view's source file, relative to the application root.

Each view's src file implements the surface with the Dashboard Extension API. See the Extension API reference.

defineWindowView

The app's main, full-page view. It fills the Dashboard to the right of the dock and any open panel, and it is the surface a traditional App SDK app renders into. An application can have at most one. If you set entry in defineApplication, the CLI creates this view for you. Use dock to place it in the dock. See Customize your app's dock item for groups and ordering.

  • dock

    object

    Dock placement. dock.group is system, applications, or user, and defaults to applications. dock.order sorts views within the group in ascending order.

definePanelView

A view that opens beside the current app from its own dock item. See Render a panel for the panel source file.

  • dock

    object

    Dock placement. dock.group is system, applications, or user, and defaults to applications. dock.order sorts views within the group in ascending order.

defineTileView

A view on the Dashboard home page. See Render a tile on the homepage for the tile source file.

  • Requiredsize

    small | large | banner

    The tile's footprint in the home page grid.

  • order

    number

    Sort position on the home page, ascending.

defineAssetSourceView

A custom asset source shown in asset pickers.

defineWebWorker

A background worker. Declare it in the application's webWorkers array, not views. See Run a background service for the worker source file.

Related

Was this page helpful?