Smart card - Card ssr
Overview
Examples
Reference
Smart Link is lazy-loading by default. To bypass React lazy(load), (opens new window) in Card
, use CardSSR
from /ssr
entrypoint, (opens new window).
CardSSR
has been fully integrated with inline
appearance.
Prerequisites
The following packages are @atlaskit/smart-card
's peer dependencies
and required for Smart Links to function properly.
Please check our package.json, (opens new window) for versioning.
react
react-dom
react-intl-next
@atlaskit/link-provider
Installation
yarn add @atlaskit/smart-card
Usage
The following code example will render the inline Smart Link with no lazy-loading.
import { CardClient, SmartCardProvider } from '@atlaskit/link-provider';
import { CardSSR } from '@atlaskit/smart-card/ssr';
// To use staging environment, you must be logged in at https://pug.jira-dev.com
<SmartCardProvider client={new CardClient('staging')}>
<CardSSR appearance="inline" url="https://www.atlassian.com/" />
</SmartCardProvider>