PictureCard

Displays a card with a picture and space for information and actions.

PictureCard

To implement PictureCard component into your project you’ll need to add the import:

import PictureCard from "@kiwicom/orbit-components/lib/PictureCard";

After adding import into your project you can use it simply like:

<PictureCard
image={{
original: "385x320",
code: "dubai_ae",
name: "Dubai Arab Emirates",
placeholder: "385x320",
}}
subTitle="Prague"
title="Dubai"
/>

Props

Table below contains all types of the props available in PictureCard component.

NameTypeDefaultDescription
dataTeststringOptional prop for testing purposes.
idstringSet id for PictureCard
titlestringThe title of PictureCard
subTitlestringThe subTitle of PictureCard
labelstringThe label of PictureCard
childrenReact.NodeThe content of PictureCard
actionsReact.NodeActions - especially Buttons that will be rendered on the bottom.
heightstring"300"The height of PictureCard.
widthstringThe width of PictureCard.
hrefstringThe link of PictureCard.
externalbooleanfalseIf true, PictureCard opens link in a new tab
imageImage ImageCustomImage of PictureCard See Functional specs
onClickonClickFunction for handling onClick event.
tabIndexstring \| number"0"Specifies the tab order of an element

Image

Table below contains all types of the props available for object in Image

NameTypeDescription
originalstringThe size of image
namestringThe name of image, defines alt prop for image
codestringThe code of image, defines which image will be rendered.
placeholderstringThe preferred placeholder size See Functional specs

ImageCustom

Table below contains all types of the props available for object in Image

NameTypeDescription
namestringThe name of image, defines alt prop for image
srcstringThe location of an image if you want it to be from your own source.

Functional specs

const PictureCard = dynamic({
loader: () => import('PictureCard'),
loading: () => <Placeholder />,
ssr: false,
});