Media object
import React from 'react';
import { Media } from 'reactstrap';
const Example = () => {
return (
<Media>
<Media left href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
<Media body>
<Media heading>
Media heading
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</Media>
</Media>
);
};
export default Example;
Properties
Media.propTypes = {
body: PropTypes.bool,
bottom: PropTypes.bool,
children: PropTypes.node,
className: PropTypes.string,
heading: PropTypes.bool,
left: PropTypes.bool,
list: PropTypes.bool,
middle: PropTypes.bool,
object: PropTypes.bool,
right: PropTypes.bool,
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
top: PropTypes.bool,
};
Nesting
import React from 'react';
import { Media } from 'reactstrap';
const Example = () => {
return (
<Media>
<Media left href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
<Media body>
<Media heading>
Media heading
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
<Media>
<Media left href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
<Media body>
<Media heading>
Nested media heading
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</Media>
</Media>
</Media>
</Media>
);
};
export default Example;
Alignment
import React from 'react';
import { Media } from 'reactstrap';
const Example = () => {
return (
<div>
<Media>
<Media left top href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
<Media body>
<Media heading>
Top aligned media
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</Media>
</Media>
<Media className="mt-1">
<Media left middle href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
<Media body>
<Media heading>
Middle aligned media
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</Media>
</Media>
<Media className="mt-1">
<Media left bottom href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
<Media body>
<Media heading>
Bottom aligned media
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</Media>
</Media>
</div>
);
};
export default Example;
Media list
import React from 'react';
import { Media } from 'reactstrap';
const Example = () => {
return (
<Media list>
<Media tag="li">
<Media left href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
<Media body>
<Media heading>
Media heading
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
<Media>
<Media left href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
<Media body>
<Media heading>
Nested media heading
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
<Media>
<Media left href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
<Media body>
<Media heading>
Nested media heading
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</Media>
</Media>
</Media>
</Media>
<Media>
<Media left href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
<Media body>
<Media heading>
Nested media heading
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</Media>
</Media>
</Media>
</Media>
<Media tag="li">
<Media body>
<Media heading>
Media heading
</Media>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</Media>
<Media right href="#">
<Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
</Media>
</Media>
</Media>
);
};
export default Example;