Skip to main navigationSkip to main content
Return to Sky UI homepage
import { InfoCard } from '@sky-uk/ui-core';

The Info Card displays information in a consistent and flexible way, with the option for additional links for action.

<InfoCard $width="288px">
  <InfoCard.Image
    src="https://placehold.co/576x162/"
    $aspectRatio="32 / 9"
    role="presentation"
    alt=""
  />
  <InfoCard.Heading src={tvLinear}>Headline</InfoCard.Heading>
  <InfoCard.Tag label="Label" />
  <InfoCard.Description
    content={`Optional description to support the user in understanding the content within this info card.`}
  />
  <InfoCard.TextListItem heading="Sub headline" body="Sub content" />
  <InfoCard.InlineAlert $variant="information" $showIcon>
    <InfoCard.InlineAlert.Heading>Heading Text</InfoCard.InlineAlert.Heading>
    <InfoCard.InlineAlert.Content>Content</InfoCard.InlineAlert.Content>
  </InfoCard.InlineAlert>
  <InfoCard.LinkListItem href="http://www.sky.com" target="_blank">
    Text Link
  </InfoCard.LinkListItem>
</InfoCard>

Props

InfoCard

PropTypeDefaultDescription
$stackedListbooleanundefined
The format of the text list. This prop is responsive and can be used to set the TextListItem item format at different breakpoints.

InfoCard.Image

PropTypeDefaultDescription
$aspectRatiostring16 / 9
The aspect ratio of the image. This prop is responsive and can be used to set the Image aspect ratio at different breakpoints.

InfoCard.Heading

PropTypeDefaultDescription
srcstringundefined
The src prop expects a partial SVG path of the icon that you want to render to the left of the Heading text. It is recommend to use icons from the Skycons package. (See Skycons)

InfoCard.Description

PropTypeDefaultDescription
contentstringundefined
The content prop expects either a string or Markdown to be rendered as the description text.

InfoCard.TextListItem

PropTypeDefaultDescription
headingstringundefined
The heading prop expects a string to be rendered as the text list sub headline.
bodystringundefined
The body prop expects a string to be rendered as the text list content.

InfoCard.InlineAlert

The InfoCard.InlineAlert extends the Inline Alert component.

The InlineAlert supports all of the InlineAlert subcomponents and props.

InfoCard.LinkListItem

The InfoCard.LinkListItem extends the Text Link component.

The LinkListItem supports the use of as if the use case requires a button.

Multiple Info Cards

<Flex $flexDirection={{xs: 'column', lg: 'row'}} $gap={{xs: 4, lg: 5}}>
  <InfoCard $flex="1 1 50%">
    <InfoCard.Image
      src="https://placehold.co/576x162/"
      $aspectRatio="32 / 9"
      role="presentation"
      alt=""
    />
    <InfoCard.Heading src={tvLinear}>Headline</InfoCard.Heading>
    <InfoCard.Tag label="Label" />
    <InfoCard.Description
      content={`Optional description to support the user in understanding the content within this info card.`}
    />
    <InfoCard.TextListItem heading="Sub headline" body="Sub content" />
    <InfoCard.TextListItem heading="Sub headline" body="Sub content" />
    <InfoCard.TextListItem heading="Sub headline" body="Sub content" />
    <InfoCard.LinkListItem href="http://www.sky.com" target="_blank">
      Text Link
    </InfoCard.LinkListItem>
  </InfoCard>
  <InfoCard $flex="1 1 50%">
    <InfoCard.Heading src={tvLinear}>Headline</InfoCard.Heading>
    <InfoCard.Tag label="Label" />
    <InfoCard.Description
      content={`Optional description to support the user in understanding the content within this info card.`}
    />
    <InfoCard.TextListItem heading="Sub headline" body="Sub content" />
    <InfoCard.LinkListItem href="http://www.sky.com" target="_blank">
      Text Link
    </InfoCard.LinkListItem>
    <InfoCard.LinkListItem href="http://www.sky.com" target="_blank">
      Text Link
    </InfoCard.LinkListItem>
    <InfoCard.LinkListItem href="http://www.sky.com" target="_blank">
      Text Link
    </InfoCard.LinkListItem>
  </InfoCard>
  <InfoCard $flex="1 1 50%">
    <InfoCard.Image
      src="https://placehold.co/576x162/"
      $aspectRatio="32 / 9"
      role="presentation"
      alt=""
    />
    <InfoCard.Heading>Headline</InfoCard.Heading>
    <InfoCard.Description
      content={`Optional description.`}
    />
    <InfoCard.TextListItem heading="Sub headline" body="Sub content" />
  </InfoCard>
</Flex>