Sanity Library Reference Docs
    Preparing search index...

    Function defineAssetSourceView

    • Beta

      Defines an asset source view — contributes an asset source.

      Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.

      Parameters

      Returns BlueprintAssetSourceViewConfig

      The asset source view declaration

      Configuration for an asset source view.

      • name: string

        Unique within the application. Must match ^[a-zA-Z0-9_-]+$.

      • src: string

        The location of the view source code, relative to the application root.

      • surface: "asset-source"

        The surface the view targets.

      • title: string

        Human-readable title for the view.

      • type: "view"

        Set by the view definers.

      defineAssetSourceView({
      name: 'image-picker',
      title: 'Image Picker',
      src: './src/asset-sources/image-picker.tsx',
      })