# provideSiAgGridConfig Type documentation

## TypeScript declaration

### [provideSiAgGridConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/ag-grid/provider.ts#L69-L83>)

**Kind:** constant

```
import { provideSiAgGridConfig } from '@siemens/element-ng/ag-grid';
```

Provides AG Grid global configuration with Element design system theme.

This provider configures AG Grid with the Element theme, custom components, and density-specific styling. Use it in your application providers.

Returns: Environment providers for dependency injection

Example:

```typescript
// In app.config.ts
export const appConfig: ApplicationConfig = {
  providers: [
    provideSiAgGridConfig()
  ]
};

// With custom options
export const appConfig: ApplicationConfig = {
  providers: [
    provideSiAgGridConfig('compact', {
      rowHeight: 30,
      suppressMenuHide: true
    })
  ]
};
```

```
(density?: "compact" | "comfort" | "standard", gridOptions?: GridOptions<any> | undefined) => EnvironmentProviders = ...
```

```
provideSiAgGridConfig(density?: "compact" | "comfort" | "standard" = 'standard', gridOptions?: GridOptions<any>): EnvironmentProviders
```

Provides AG Grid global configuration with Element design system theme.

This provider configures AG Grid with the Element theme, custom components, and density-specific styling. Use it in your application providers.

Returns: Environment providers for dependency injection

Example:

```typescript
// In app.config.ts
export const appConfig: ApplicationConfig = {
  providers: [
    provideSiAgGridConfig()
  ]
};

// With custom options
export const appConfig: ApplicationConfig = {
  providers: [
    provideSiAgGridConfig('compact', {
      rowHeight: 30,
      suppressMenuHide: true
    })
  ]
};
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [density](<https://github.com/siemens/element/blob/main/projects/element-ng/ag-grid/provider.ts#L70-L70>) (optional) | `"compact" \| "comfort" \| "standard"` | `'standard'` | • The density variant to use. Options:<br><br>• 'compact': Minimal spacing (28px row height, 32px header height, 4px spacing)<br><br>• 'standard': Default spacing (42px row height, 48px header height, 8px spacing)<br><br>• 'comfort': Generous spacing (84px row height, 96px header height, 12px spacing) |
| [gridOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/ag-grid/provider.ts#L71-L71>) (optional) | `GridOptions<any>` |  | • Optional AG Grid options to merge with Element defaults. These options will override Element defaults if specified. |

**Returns:** [EnvironmentProviders](<https://angular.dev/api/core/EnvironmentProviders>)
