> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/dashboard-plugin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/dashboard-plugin/api-and-gui/api/register/default-config.md).

# Default config

## What is defaultConfig?

defaultConfig is an object you can register with your Plugin to make sure that your plugin will have some default config value when a user install/update your plugin in Dashboard

```jsx
import DashboardPlugin from 'Dashboard/plugin'

const Plugin = new DashboardPlugin('@plugin_bundle')

const registerPlugin = () => {
    const { Application } = require('@components/Application')
    
    Plugin.register({
        application: Application,

        defaultConfig: {
            applicationKey: 'xxxx-xx-xxxxx-x-xxx'
        }
    })
}

registerPlugin()

export {
    Plugin
}
```

The object keys should be the ref keys of your config field.

In our example 👆🏽we registered a default config object with a key `applicationKey` that means in the Settings component, the ref who has the same key `applicationKey` will share the same value and it will be assigned as a default value for that ref

```jsx
import { Plugin } from '@root'

const GUI = Plugin.GUI

class Settings extends Plugin.settings {
    plugin() {
        return (
            <div>
                <GUI.ConfigInput
                    name={'Application key'}
                    ref={refs => this.handleRefs(refs, 'applicationKey')}
                />
            </div>
        )
    }
}
```

{% hint style="info" %}
If a plugin is already installed, and you added a new key to the defaultConfig object, Dashboard will add the new key to the config automatically, once the plugin is updated
{% endhint %}

{% hint style="info" %}
If a plugin is already installed, and you removed a key from the defaultConfig object, Dashboard won't remove any keys or value from the config.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.navigaglobal.com/dashboard-plugin/api-and-gui/api/register/default-config.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
