# Access configuration values in new platform plugin

**URL:** <https://discuss.elastic.co/t/access-configuration-values-in-new-platform-plugin/247261>\
**Category:** Kibana\
**Created:** [September 2, 2020, 3:55pm UTC](https://discuss.elastic.co/t/access-configuration-values-in-new-platform-plugin/247261 "2020-09-02T15:55:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elaak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elaak/32/55014_2.png) [@Elaak](https://discuss.elastic.co/u/Elaak)\
**Post date:** [September 2, 2020, 3:55pm UTC](https://discuss.elastic.co/t/access-configuration-values-in-new-platform-plugin/247261/1 "2020-09-02T15:55:25Z")

</div>

I have defined a visualization plugin for the new platform currently running on Kibana 7.8.2 (github version). Now I have realized I need to let users enter some configuration values in order to make the usage more dynamic. The question is just how I access this information.

I have defined a configuration schema for my plugin in `config.ts`

```auto
import { schema, TypeOf } from '@kbn/config-schema';

export const configSchema = schema.object({
    enabled: schema.boolean({ defaultValue: true }),
    dateformats: schema.object({ key: schema.string(), value: schema.string() })
});

```

This is as far as I have come. I do not understand where I should "register" this schema, and also where I later in my visualization component can access this value.

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [September 2, 2020, 4:04pm UTC](https://discuss.elastic.co/t/access-configuration-values-in-new-platform-plugin/247261/2 "2020-09-02T16:04:32Z")

</div>

I think the best documented information is in the migration guide here: [https://github.com/elastic/kibana/blob/master/src/core/MIGRATION.md#configure-plugin](https://github.com/elastic/kibana/blob/master/src/core/MIGRATION.md#configure-plugin)

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [September 2, 2020, 4:31pm UTC](https://discuss.elastic.co/t/access-configuration-values-in-new-platform-plugin/247261/3 "2020-09-02T16:31:05Z")

</div>

You can check this [example](https://github.com/synapticielfactory/kibana_cohort) if it can help you.  
You need to provide a compoenent (or html if you use BaseViz) that will capture user input (Options Tab), like [this](https://github.com/synapticielfactory/kibana_cohort/blob/master/public/cohort_vis_type.tsx#L58)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 30, 2020, 4:31pm UTC](https://discuss.elastic.co/t/access-configuration-values-in-new-platform-plugin/247261/4 "2020-09-30T16:31:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
