packages/components/layout/eui-header/header-environment/header-environment.component.ts
Environment indicator component for header placement, displaying the current application environment (dev, test, production, etc.). Provides visual distinction between different deployment environments to prevent user confusion and accidental actions. Automatically registers with EuiAppShellService to share environment information across the application. Content is projected via ng-content allowing custom environment labels and styling. Typically displays text like "Development", "Testing", "Staging" with distinct background colors.
Example :<eui-app>
<eui-app-header>
<eui-header>
<eui-header-logo></eui-header-logo>
<eui-header-environment>DEV</eui-header-environment>
<eui-header-app appName="MyWorkplace"></eui-header-app>
</eui-header>
</eui-app-header>
</eui-app>
| changeDetection | ChangeDetectionStrategy.Default |
| encapsulation | ViewEncapsulation.None |
| selector | eui-header-environment |
| template | |
| styleUrl | ./header-environment.component.scss |
Properties |
HostBindings |
| class |
Type : string
|
Default value : 'eui-header-environment'
|
| cssClass |
Type : string
|
Default value : 'eui-header-environment'
|
Decorators :
@HostBinding('class')
|