Plugin Samples

January 28, 2020 ยท View on GitHub

This repository contains a library of sample XD plugins to help you on your journey. You can use these samples to learn more about how to build plugins for Adobe XD.

For each sample, be sure to read the README as well as code comments. Note that samples that start with how-to- have companion tutorials in the plugin-docs repo, which can be viewed live on our developer portal at:

https://adobexdplatform.com/plugin-docs/tutorials/

Samples list

ExtensionMain APIs UsedDescriptionMinimum Version
e2e-adobe-stockUI, Network I/O (Fetch)Lets users use End-to-end Adobe Stock Photo Search13.0
e2e-colorize-textUI, Scenegraph, ScenenodeListProvides several text color utilities13.0
e2e-create-polygonUI, Scenegraph, ScenenodeListLets users create a custom polygon19.0
e2e-customize-bannerUI, ScenegraphProvides a simple UI that lets user create custom sized banners13.0
e2e-stock-chartUI, File I/O, Scenegraph, Network I/O (Fetch)Draws a line chart of the picked stock quote13.0
quick-startScenegraphCreates a rectangle object and inserts it into the artboard13.0
quick-start-panelScenegraphIncrease the selected rectangle size by user's input value21.0
quick-start-reactScenegraphCreates a rectangle object and inserts it into the artboard (using React)18.0
how-to-show-an-alertUIDemonstrates how to show an alert and an error dialog13.0
how-to-create-path-objectsScenegraphDemonstrates how to create shapes using path objects13.0
how-to-draw-linesScenegraphDemonstrates how to create line objects13.0
how-to-generate-an-export-renditionFile I/O, Application(renditions)Demonstrates how to generate an export rendition of an object13.0
how-to-importFile I/O, ScenegraphDemonstrates how to import a .txt file13.0
how-to-integrate-with-OAuthNetwork I/O (XHR, openExternal), Node.js serverDemonstrates how to integrate with a third-party OAuth13.0
how-to-make-network-requestsNetwork I/O (XHR , Fetch), ScenegraphDemonstrates how to make network requests13.0
how-to-style-textScenegraphDemonstrates how to create text nodes with styled text13.0
how-to-work-with-scenenodelistScenegraphDemonstrates how to create various objects and use scenenode list to filter and color13.0
i18n-pojoUI, Application(appLanguage)Demonstrates how to localize your plugin13.0
sg-chart-generatorScenegraph, CommandsDemonstrates how to generate pie charts and bar charts13.0
sg-dummy-dataScenegraph, CommandsDemonstrates how to generate random data13.0
sg-dynamic-buttonScenegraph, CommandsUpdates a frame shape to wrap a text element exactly with a specified amount of padding13.0
sg-fit-to-objectScenegraph, CommandsFits an object (image) to another object (rectangle) with three options- as-is, turn clockwise, turn counter-clockwise13.0
sg-lots-of-linesScenegraphDraws multiple lines13.0
sg-margin-guidesScenegraph, CommandsCreate/remove margin guides around the existing objects in artboard(s)13.0
sg-meme-meScenegraph, CommandsTakes text inputs and an image and convert them into a meme13.0
sg-repeaterScenegraph, CommandsDuplicates the selection horizontally or circularly13.0
sg-turtleScenegraph, CommandsDraws a series of lines by following "turtle graphics" commands13.0
sg-update-weatherScenegraph, Network I/O (XHR)Finds all text elements that follow a specific pattern and insert the temperatures13.0
ui-button-paddingUIUses h function to create a simple UI with these UI elements: form, labrel, footer13.0
ui-button-padding-hyperscriptUIUses hyperscript to create these UI elements: form, labrel, footer13.0
ui-buttons-galoreUIUses document.querySelector to create these UI elements: different types of buttons13.0
ui-context-menuUIUses h function to create a context menu with these UI elements: form, footer, button13.0
ui-create-chartUIUses h function to create a menu optimized for generating charts with these UI elements: form, footer, button13.0
ui-datagrid-reactUIUses React to create data grids18.0
ui-dialog-variationsUIDemonstrates several different dialog variations13.0
ui-helloUISimply shows a dialog with "Hello World"13.0
ui-hello-hUIUsed h function to simply show a dialog with "Hello World"13.0
ui-hello-reactUIUsed React jsx to simply show a dialog with "Hello World"18.0
ui-hello-vueUIUsed Vue to simply show a dialog with "Hello World"13.0
ui-htmlUICreates a dialog showing simple UI elements: title, text, input field, and buttons13.0
ui-jqueryUIUsed jquery to create a dialog showing simple UI elements: title, text, input field, and buttons13.0
ui-panel-button-paddingUICreates a button padding around the selected object21.0
ui-panel-hello-reactUIMakes real-time changes to the color of the selected object based on user's input in the panel plugin21.0
ui-panel-scaffoldUIDemonstrates the structure of a panel plugin. There is no functionality of this plugin21.0
ui-panel-show-renditionsUICreates renditions of the selected items and display them in the panel21.0
ui-panel-simple-drag-and-dropUI, ScenegraphDemonstrates drag and drop on to XD canvas26.0
ui-panel-typography-reactUIDemonstrates various typography inside the panel UI21.0
ui-playgroundUIShows all the controls in a playground13.0
ui-rename-artoboardsUIShows a sample UI for a plugin that renames artboards13.0
ui-simple-formUIShows a simple form with these UI elements: input, textarea, select, button13.0
ui-trelloUIUses h function to create a UI that's suitable for a workflow management plugin like Trello13.0
ui-vectorizeUIUses h function to create a simple UI with these UI elements: title, text, button13.0
ui-tabs-reactUIUses React to create a simple UI with tabs18.0
  1. Go to the directory that stores your development plugin folder:

    • Mac: ~/Library/Application\ Support/Adobe/Adobe\ XD/
    • Windows: C:\Users\%USERNAME%\AppData\Local\Packages\Adobe.CC.XD_adky2gkssdxte\LocalState\
  2. Rename the develop directory, if it already exists:

    • Mac: mv plugins oldplugins
    • Windows: (use Windows Explorer)

    If you don't have a develop directory yet, simply create one.

  3. Clone this repository as the develop directory:

git clone git@github.com:AdobeXD/plugin-samples.git develop
  1. Launch XD, or if already open, use COMMAND+SHIFT+R to reload plugins.

  2. Run the plugins from XD's Plugins menu.

Make sure to check out XD Plugin Tutorials and XD Plugin References.