MediaCard
Exports 3 components:
- Card
- CardView
- CardList
Try it out
Interact with a live demo of the @atlaskit/media-card component.
Installation
yarn add @atlaskit/media-card
Using the component
Card
import {Card} from '@atlaskit/media-card';
import {ContextFactory} from '@atlaskit/media-core';
const context = ContextFactory.create({ clientId, serviceHost, tokenProvider });
const urlPreviewId = {
mediaItemType: 'link',
url: 'https://atlassian.com'
};
<Card context={context} identifier={urlPreviewId} />
const linkId = {
mediaItemType: 'link',
id: 'some-link-id',
collectionName: 'some-collection-name'
};
<Card context={context} identifier={linkId} />
const fileId = {
mediaItemType: 'file',
id: 'some-file-id',
collectionName: 'some-collection-name'
};
<Card context={context} identifier={fileId} />
* Please note that this module could have dependencies that are governed by the Atlassian Design Guidelines license which will be automatically included on install. Each dependency has a license file that indicates whether the Atlassian Design Guidelines license applies.
We're here to help!
Let us know what you think of our components and docs, your feedback is really important for us.
Are you in trouble? Read through our contribution guidelines and raise an issue to us.