If you'd like a plugin with specific features but it's not already in Builder, you can submit a public plugin to Builder with a GitHub pull request. A public plugin is a plugin that anyone can use with Builder. When a public plugin is merged, it becomes part of Builder and Builder developers maintain it.
This document covers the main types of plugins developers contribute with links to examples and more information.
Tip: You can create public plugins and submit a pull request on any plan. If a public plugin doesn't meet your needs, you can create a private plugin. Private plugins require an Enterprise plan, you host your own plugins, and you handle configuration manually.
To get started contributing plugins, you should be familiar with the following:
- the basics of Builder plugins
- git and GitHub
Plugin contributions tend to fall into three categories that cover the most common use cases:
Customer editor plugins are the main use case for creating your own plugins. Almost all of the integrations in Builder use custom editors, which incudes most of the built-in e-commerce plugins.
For example, with this type of plugin, teammates can search and link selected products and categories from their backend to structured data entries, Sections, and Pages within the Visual Editor with a minimal process.
Using custom editor plugins, marketing or design teammates can populate elements such as product cards, product galleries, add to cart buttons, and lists of product recommendations by selecting what they need from your plugin.
For more information see the following resources:
- On the Builder Forum, see How to build a Custom Editor plugin for my e-commerce backend with Builder.io.
- For an example of an e-commerce plugin in production, check out Builder's Swell plugin on GitHub.
- For help on creating your e-commerce plugin, Builder offers an e-commerce plugin utility library.
Use data connector plugins to enrich the data available in Visual Editor Sections and Pages from external sources. With a data plugin, team mates can select entries or query the source and bind to the results of queries directly in Builder.
Resources:
- For a step-by-step guide on connecting to data, see the Builder blog post Using Contentful Data in Builder's Visual Editor.
- For example data plugin code, see Builder's data plugin example on GitHub.
- For an example of a data plugin in production, check out Builder's Contentful plugin on GitHub.
- Builder also offers a data plugin utility library to help you in creating your data plugin.
You can use action shortcuts in Builder to give non-technical teammates access to some of the tasks that would otherwise require developer involvement. With action shortcuts, a user can trigger tracking events, set up conditional values, or set specific values on state without having to write code.
For example, a plugin might define an action such as Track Event with Google Analytics. When the user clicks a button, the action sends the event addToCart
to Google Analytics.
For a practical example of setting up an action shortcut plugin, refer to Builder's example action plugin on GitHub.
Custom editor plugins help you register custom field types for your Builder model custom fields and inputs for your custom components, custom targeting, and symbols.
To create a custom editor, build a React component that takes a value
prop and an onChange
prop. Within your custom editor component, call the passed in onChange()
function when the value
is updated. The value you set can be any type serializable to JSON—for example, string
, number
, null
, array
, object
—and be as deeply nested as you need.
For more information see the following resources:
If you're ready to start contributing, check these articles: