packages/components/eui-banner/eui-banner.component.ts
Banner component for displaying prominent content sections with images or videos across the full width of a page.
Provides flexible positioning options (top, center, bottom) and supports inverse color schemes.
Can display static images or video backgrounds with content overlay.
Supports size variants (S, M, L) and outline styling through BaseStatesDirective.
<eui-banner imageUrl="https://example.com/image.jpg">
<eui-banner-title>Welcome</eui-banner-title>
<eui-banner-description>Discover our services</eui-banner-description>
</eui-banner><eui-banner imageUrl="image.jpg" [euiPositionCenter]="true" [euiInverse]="true">
<eui-banner-title>Get Started</eui-banner-title>
<eui-banner-description>Join us today</eui-banner-description>
<eui-banner-cta>
<button euiButton euiCTAButton>Sign Up</button>
</eui-banner-cta>
</eui-banner><eui-banner [isVideoBanner]="true" euiSizeL>
<eui-banner-video>
<video autoplay loop muted>
<source src="video.mp4" type="video/mp4">
</video>
</eui-banner-video>
<eui-banner-title>Innovation</eui-banner-title>
</eui-banner>| changeDetection | ChangeDetectionStrategy.OnPush |
| HostDirectives |
BaseStatesDirective
Inputs : euiSizeS euiSizeM euiSizeL euiSizeVariant euiOutline
|
| selector | eui-banner |
| templateUrl | ./eui-banner.component.html |
| styleUrl | ./eui-banner.scss |
Inputs |
HostBindings |
Accessors |
| e2eAttr |
Type : string
|
Default value : 'eui-banner'
|
|
Data attribute value for end-to-end testing identification. Applied as data-e2e attribute on the host element. |
| euiInverse |
Type : boolean
|
Default value : false
|
|
Applies inverse color scheme to the banner. When true, uses light text on dark background for better contrast with images. |
| euiPositionCenter |
Type : boolean
|
Default value : false
|
|
Positions the banner content at the center of the banner area. When true, vertically centers content within the banner. |
| euiPositionTop |
Type : boolean
|
Default value : false
|
|
Positions the banner content at the top of the banner area. When true, aligns content to the top with appropriate spacing. |
| imageUrl |
Type : string
|
|
URL path to the banner background image. When provided, displays the image as the banner background. Optional. |
| isVideoBanner |
Type : boolean
|
Default value : false
|
|
Enables video banner mode for displaying video backgrounds. When true, configures banner to support video content instead of static images. |
| class |
Type : string
|
| cssClasses |
getcssClasses()
|