@contentstack/app-sdk

中文文档
2.4.1发布于 2026/06/18MITTypeScriptCommonJS近 30 天下载 2.7万

The Contentstack App SDK allows you to customize your Contentstack applications.

原始使用文档
文档目录16 节
  1. Getting started
  2. Initializing the App SDK
  3. Download the Boilerplate
  4. UI Locations and Examples
  5. Custom Field Location
  6. Dashboard Location
  7. Asset Sidebar Location
  8. App Config Location
  9. RTE Location
  10. Sidebar Location
  11. Field Modifier Location
  12. Full Page Location
  13. Using Contentstack styles
  14. More information
  15. App SDK v2.0.0 Migration Guide
  16. License

Contentstack App SDK Readme

The Contentstack App SDK allows you to customize your applications. This document will help you integrate the App SDK with your application.

Getting started

Include the compiled version of the extension client library by adding the following line to your application.

<script
    src="https://unpkg.com/@contentstack/[email protected]/dist/index.js"
    integrity="sha512-oS3voAIrtiBqIsDI51ASg/yTDsH/cLfjlKAwqHQHMVswsHHzJw9thwb+4k6RQsk5E4OBCS96gFUtzySjkWXmQw=="
    crossorigin="anonymous"
></script>

To include the App SDK in your project, you need to run the following command:

npm install @contentstack/app-sdk

Alternatively, you can use the following command within the script tag to install the App SDK:

<script src="https://unpkg.com/@contentstack/[email protected]/dist/index.js"></script>

Initializing the App SDK

To Initialize the App SDK you need to run the following command:

ContentstackAppSdk.init().then(function (appSdk) {
    // add code here
});

For more information, please refer to our App SDK API Reference document.

Download the Boilerplate

You can extend or customize the functionality of Contentstack CMS with Marketplace apps. To simplify and speed up the building process, boilerplates describe repetitive elements in a project. This boilerplate will help you build custom applications for your organization or stack.

Download the boilerplate.

UI Locations and Examples

UI Locations allow you to extend Contentstack's functionality. Through these UI locations, you can customize Contentstack's default behavior and UI. Integration of third-party applications is possible using different UI locations.

The Contentstack App SDK currently supports the following UI Locations:

Custom Field Location

Custom Field Location allows you to create custom fields that can be used in your content types. You can integrate with various business applications, such as Bynder, Cloudinary, Shopify, by adding them as a custom field to your stack's content type.

Dashboard Location

With the Dashboard Location, you can create widgets for your stack dashboard. Integration with Google Analytics provides meaningful insights about your website.

Asset Sidebar Location

Using the Asset Sidebar Location, you can create customized sidebar widgets to extend the functionality of your assets.

Manage, transform, and optimize your stack's assets efficiently using the Image Preset Builder.

App Config Location

App Config UI Location allows you to manage all the app settings centrally. Once configured, all other locations (where the app is installed) can access these settings.

RTE Location

The RTE Location allows you to create custom plugins to expand the functionality of your JSON Rich Text Editor. Using the Audience and Variables plugin, you can tailor your content as per your requirements.

Sidebar Location

The Sidebar Location provides powerful tools for analyzing and recommending ideas for your entry. Use the Smartling sidebar location to help translate your content.

Field Modifier Location

The Field Modifier Location is a type of UI location which extends the capabilities of entry fields. With the Field Modifier UI location, you can allow the different apps to appear on defined field data types such as Text, Number, JSON, Boolean, File, Reference fields etc.

Full Page Location

The Full Page location is a type of UI location that lets you view full page apps such as Release Preview within your stack.

Using Contentstack styles

Install the Venus UI library package to style your app according to the Contentstack UI:

npm i @contentstack/venus-components --save

For more information on styling your application, refer to our style guide.

More information

App SDK v2.0.0 Migration Guide

This guide provides instructions for migrating your application to App SDK version 2.0.0. It covers changes in metadata responses, field modifier and full page location updates, and the transition from the _extension property to _uiLocation. If you are upgrading your app to the latest version, make sure to follow these steps for a smooth transition.

Read the Migration Guide

License

Licensed under MIT.

版本与发布记录

@contentstack/app-sdk 共发布 29 个版本,首次发布于 2022/01/07;过去 12 个月发布了 4 个版本。

版本发布日期距今
2.4.1latest2026/06/184 个月前
2.4.02026/06/114 个月前
2.3.62026/03/187 个月前
2.3.52026/01/239 个月前
2.3.42025/11/101 年前
2.3.32025/10/171.1 年前

其他发布通道:beta → 1.4.0-beta.1。

关于 @contentstack/app-sdk 的常见问题

@contentstack/app-sdk 是什么?

The Contentstack App SDK allows you to customize your Contentstack applications.

如何安装 @contentstack/app-sdk?

在项目目录运行 npm install @contentstack/app-sdk,或使用 pnpm add / yarn add / bun add。

@contentstack/app-sdk 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@contentstack/app-sdk 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@contentstack/app-sdk 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.x。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@contentstack/app-sdk 可以商用吗?

@contentstack/app-sdk 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@contentstack/app-sdk 的下载量有多少?

根据 npm 官方下载统计,@contentstack/app-sdk 在 2026/10/11 – 2026/11/09 这 30 天内被下载 26,550 次,日均约 885 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@contentstack/app-sdk 还在维护吗?

最新版本 2.4.1 发布于 2026/06/18(4 个月前);至今共发布 29 个版本,其中过去 12 个月发布了 4 个;首次发布于 2022/01/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。