To develop your own Canvas plugins, you simply create a Kibana plugin, and register your customizations with Canvas.
The following is a step-by-step guide to adding your own custom random number Canvas plugin.
## Generating a Kibana plugin
```bash
# in the kibana directory
# Rename canvas_example to whatever you want your plugin to be named
node scripts/generate_plugin.js canvas_example
```
This will prompt you for some input. Generally, you can answer as follows:
```
❯ node scripts/generate_plugin.js canvas_example
? Would you like to create the plugin in a different folder? No
? Provide a short description An awesome Kibana plugin
? What Kibana version are you targeting? master
? Should an app component be generated? No
? Should a server API be generated? No
? Should translation files be generated? No
? Would you like to use a custom eslint file? No
```
Once this has completed, go to your plugin directory:
```bash
cd plugins/canvas_example
```
Open that folder in your code editor of choice: `code .`
### Creating a Canvas element and function
Open your plugin's `kibana.json` file. Make sure that `ui` has a value of true, and that `'canvas'` is included in `requiredPlugins`. It should look something like this.
```json
{
"id": "canvasExample",
"version": "7.8.0",
"server": false,
"ui": true,
"requiredPlugins": ["canvas"],
"optionalPlugins": []
}
```
In your plugin folder, create a new folder `public` and an `index.ts` file within it.
This `index.ts` will need export a Kibana Plugin. You can use this as a starting point for your plugin.
```typescript
import { Plugin, CoreSetup, CoreStart } from '../../../src/core/public';
import { CanvasSetup } from '../../../x-pack/plugins/canvas/public';
If your Kibana Server is crashing on startup with a message like
> **FATAL** Error: Unmet requirement "canvas" for plugin "your_plugin_name"
or
> **FATAL** Error: Unmet requirement "interpreter" for plugin "your_plugin_name"
then your plugin was likely created to work on a previous version of Kibana. Starting with version 7.8, the plugin system was redesigned and caused breaking changes to these earlier plugins.
The good news is that all of your existing Canvas extension code can be reused, it just needs to be in an updated Kibana plugin. Follow the [instructions](#generating-a-kibana-plugin) for creating a new Canvas Kibana plugin, and then add in your existing functions and elements.