# createModalConfig Type documentation

## TypeScript declaration

### [createModalConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modal.helpers.ts#L9-L26>)

**Kind:** constant

```
import { createModalConfig } from '@siemens/element-ng/modal';
```

```
(inputs?: { [key: string]: any; } | undefined) => ModalOptions<Record<string, any>> = ...
```

```
createModalConfig(inputs?: { [key: string]: any; }): ModalOptions<Record<string, any>>
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [inputs](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modal.helpers.ts#L9-L9>) (optional) | `{ [key: string]: any; }` |  |  |

**Returns:** [ModalOptions](<index.html#t:ModalOptions>)`<``Record``<`[string](<https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String>)`, `[any](<https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any>)`>>`

### Types Documentation

### [ModalOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L34-L57>)

**Kind:** interface

```
import type { ModalOptions } from '@siemens/element-ng/modal';
```

```
interface ModalOptions<T = Record<string, any>> extends ModalDependencyInjectionOptions
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [animated](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L52-L52>) (optional) | `boolean` | Whether to enable animation. |
| [ariaLabelledBy](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L56-L56>) (optional) | `string` | aria-labelled-by value. |
| [bindings](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L39-L39>) (optional) | `Binding[]` | Angular bindings for component content, created with `inputBinding`, `outputBinding`, or `twoWayBinding`. Ignored for template content. |
| [class](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L54-L54>) (optional) | `string` | Additional CSS class. |
| [environmentInjector](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L31-L31>) (optional, inherited) | `EnvironmentInjector` | Optional environment Injector.<br><br>Inherited from [ModalDependencyInjectionOptions](<index.html#t:ModalDependencyInjectionOptions>) |
| [ignoreBackdropClick](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L46-L46>) (optional) | `boolean` | When set to true, clicking the backdrop has no effect. |
| [injector](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L29-L29>) (optional, inherited) | `Injector` | Optional element Injector.<br><br>Inherited from [ModalDependencyInjectionOptions](<index.html#t:ModalDependencyInjectionOptions>) |
| [inputValues](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L44-L44>) (optional) | `Record<string, unknown>` | Use this to assign values to either `@Input()` or `input()` fields of the provided component. If a template is used, the values are available in the template context. |
| [keyboard](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L50-L50>) (optional) | `boolean` | Handle Esc to close/message. |
| [messageInsteadOfAutoHide](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L48-L48>) (optional) | `boolean` | When set to true, backdrop click or Esc don't close the modal. Instead a message will be sent. |
| [providers](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L27-L27>) (optional, inherited) | `StaticProvider[]` | Additional providers for the modal.<br><br>Inherited from [ModalDependencyInjectionOptions](<index.html#t:ModalDependencyInjectionOptions>) |

### [ModalDependencyInjectionOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L25-L32>)

**Kind:** interface

```
import type { ModalDependencyInjectionOptions } from '@siemens/element-ng/modal';
```

```
interface ModalDependencyInjectionOptions
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [environmentInjector](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L31-L31>) (optional) | `EnvironmentInjector` | Optional environment Injector. |
| [injector](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L29-L29>) (optional) | `Injector` | Optional element Injector. |
| [providers](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L27-L27>) (optional) | `StaticProvider[]` | Additional providers for the modal. |
