Card media is container for the card media section. Use it to wrap images and videos.

IgxCardMediaDirective

new IgxCardMediaDirective(): IgxCardMediaDirective

Returns IgxCardMediaDirective

Sets the height style property of the media container. If not provided it will be set to auto.

height: string = 'auto'

Defined in projects/igniteui-angular/card/src/card/card.component.ts:58

Example

<igx-card-media height="50%"></igx-card-media>

Sets the role attribute of the media container.

role: string = 'img'

Defined in projects/igniteui-angular/card/src/card/card.component.ts:65

Sets the width and min-width style property of the media container. If not provided it will be set to auto.

width: string = 'auto'

Defined in projects/igniteui-angular/card/src/card/card.component.ts:45

Example

<igx-card-media width="300px"></igx-card-media>