contentstack / ui-extensions-sdk

The function of Contentstack's UI can be extended by adding custom widgets and fields through extensions. The following Extensions SDK gives an overview of different custom extensions for you to add to the Contentstack app.
MIT License
21 stars 12 forks source link

Contentstack Extensions SDK

The Extensions SDK allows you to extend Contentstack’s UI by helping you create Custom Fields, Custom Widgets, and Dashboard Widgets.

Custom Fields enable users to introduce simpler interface controls, such as color picker, code editor, video selector, and more, or maybe complex micro web applications such as Shopify or Snipkart. Because of their dissociated nature, custom fields can be reused multiple times.

Custom Widgets are like micro content-processing apps that help you analyze the entry content and provide recommendations. Some of the useful widgets you can create using this type of extension are text intelligence, SEO recommendations, language translation, grammar checker and more.

Dashboard Widgets let you add powerful widgets to the stack’s dashboard that let users do more from a centralized location. Some examples of this type of extension include personal notes, recently published content, notification centre, and stack usage summary.

This SDK overview document introduces you to the concept of custom extensions.

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/ui-extensions-sdk@2.2.3/dist/ui-extension-sdk.js"
    integrity="sha512-LMktiFAj7j/AUFctMlgY8qmLrLIQVctwwCsnCXIWnvgF9JlanilvFbZxOCtPNB5eO3vp2Nhw9ED1UsWa+ltSvQ=="
    crossorigin="anonymous"
></script>

Extensions examples

Custom Fields

Some of the examples of custom field extensions are:

Custom Widgets

Some of the examples of custom widget extensions are:

Dashboard Widgets

Some of the examples of the dashboard widget extensions are:

Using Contentstack styles

Extensions are rendered within an iframe, you will need to include the ui-extension-sdk.min.css library within your custom extension in order to use any of the styles provided by Contentstack.

Include the CSS file in your extension code as follows:

<link
    rel="stylesheet"
    type="text/css"
    href="https://unpkg.com/@contentstack/ui-extensions-sdk/dist/ui-extension-sdk.css"
    integrity="sha512-yPPI/jWiqPr0HIh+1A2QPP5p58sSYqbPoBykxIuBckT1vzGwNbrOmwYM03qGI4ffnxd7q4kkoDys0kdZzxYn9A=="
    crossorigin="anonymous"
/>

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

More information

License

Licensed under MIT.