CardMedia Edit

CardMedia provides a container for media elements within a Card.

Usage

import { Card, CardBody, CardMedia } from '@wordpress/components';

const Example = () => (
    <Card>
        <CardMedia>
            <img src="..." />
        </CardMedia>
        <CardBody>...</CardBody>
    </Card>
);

Top ↑

Placement

CardMedia can be placed in any order as a direct child of a Card (it can also exist as the only child component). The styles will automatically round the corners of the inner media element.