# SiSelectGroupTemplateDirective documentation

**Kind:** directive

**Selector:** `[siSelectGroupTemplate]`

```
import { SiSelectGroupTemplateDirective } from '@siemens/element-ng/select';
```

The directive allows to template/customize the group option rendering. This requires using the [SiSelectSimpleOptionsDirective](<../SiSelectSimpleOptionsDirective/index.html#SiSelectSimpleOptionsDirective>) to specify options as input.

Example:

```html
<si-select [options]="[
  { type: 'group', key: 'g1', label: 'Group 1', options: [
    { type: 'option', value: 'g1.i1', label: 'Item 1' },
    { type: 'option', value: 'g1.i2', label: 'Item 2' }
  ]},
  { type: 'group', key: 'g2', label: 'Group 2', options: [
    { type: 'option', value: 'g2.i1', label: 'Item 1' }
  ]}
]">
  <ng-template siSelectGroupTemplate let-group>{{ group.key | uppercase }}</ng-template>
</si-select>
```

```
directive SiSelectGroupTemplateDirective
```
