Module Configuration - bitfocus/companion-module-base GitHub Wiki
The module configuration is like preferences for the connection. E.g. the IP-address of the device controlled by the instance.
As part of creating a module, you should implement the getConfigFields() method.
Companion will call this when the configuration panel is opened for your module, so that it can present the correct fields to the user.
The fields you can use here are similar to the ones for actions and feedbacks, but with more limitation.
You can see the list of field types here, the linked documentation states any limitations that apply when used for the configuration, or if they are not allowed.
Additionally, each field is required to have a width property. This should be a value 1-12.
When your module is initialised, you will be provided a copy of the config, and any time the user changes the configuration, configUpdated() will be called.
As of module-api v1.14.0, the connection config provides less granular control over the layout, instead placing everything in a single column. This has been done to unify the layout with elsewhere within Companion.
At the moment (in Companion v4.2) it is possible to opt into the old layout, if you are not ready to ensure this works well for your module, you can opt out by adding in the constructor this.options.disableNewConfigLayout = true. This should only be done as a temporary measure, at some point in the future this will not be supported.
If you do this, let us know what is missing for you to switch. We recognise that there may be functionality you need and want to expand upon what the new layout offers.