---
title: StoryCard
---

import LibraryInfo from '@theme/LibraryInfo'
import { Feedback, TokensTable, PropsTable } from '../../src/components'
import { StoryCard, StackView } from '@telus-uds/components-web'
import { StoryCard as WebDocs } from 'docs/@telus-uds/components-web'
import AvailableOnWebOnly from '../../partials/_platform-considerations-web-only.mdx'
import VideoLinkWarning from '../../partials/_video-link-warning.mdx'

# StoryCard

<LibraryInfo
  packageType="Web Component"
  figmaLink="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2F4zJn2Qn6uXOqPP1GVDipy6%2F%25F0%259F%258D%2580-Allium-Components%3Fnode-id%3D4040%253A54814"
/>

```jsx live
<div style={{ maxWidth: '30rem', margin: '0 auto' }}>
  <StoryCard
    href="https://telus.com"
    tag="Example category"
    date="Dec 25, 2021"
    title="An article with a headline"
    description="A description in which the content of the linked article is succinctly summarised."
    fullBleedContent={{
      alt: 'Full Bleed Image Example',
      src: '/universal-design-system/img/pigs-allium-lo.png'
    }}
  />
</div>
```

## Introduction

A StoryCard is a Card designed for guiding a user to an article based on the article's title and description.

[Follow the appropriate instructions](importing-components) to add this component in to your app.

## Guidance

- Showcase and guide users to another page
- Whole card is interactive
- Width expands based on column or container
- Height expands to the tallest StoryCard in the row
- You can render any content full bleed-style by passing some JSX to the `content` field of the `fullBleedContent` prop:

```jsx live
<StoryCard
  href="https://telus.com"
  tag="Example category"
  date="Dec 25, 2021"
  title="An article with a headline"
  description="A description in which the content of the linked article is succinctly summarised."
  fullBleedContent={{
    alt: 'Full Bleed Image Example',
    position: 'bottom',
    content: (
      <OptimizeImage
        contentfulAssetUrl="/universal-design-system/img/pigs-allium-lo.png"
        alt="guinea pig"
      />
    )
  }}
/>
```

<VideoLinkWarning />

### Accessibility

The entire card is focused as one unit, and screenreaders read the content of each card as
one unit. Multiple cards will therefore be read as a list of semantic links.

### Platform considerations

<AvailableOnWebOnly />

## Props

<PropsTable web={WebDocs} />

## Tokens

<TokensTable web={WebDocs} component="StoryCard" />

## Variants

`StoryCard` has no stylistic variants.

It is similar to `PreviewCard`, which has a slightly different layout and no article `description`.

### Groups of `StoryCard` components

Multiple `StoryCard` components may be laid out in a stacking component to give users a selection of articles.

This is an example of three `StoryCard`s in a responsive `StackView` that flips from horizontal to vertical based on viewport:

```jsx
import { StackView, StoryCard } from '@telus-uds/components-web'
```

```jsx live
<StackView direction={{ xs: 'column', md: 'row' }} space={{ xs: 2, lg: 3 }}>
  <StoryCard
    href="https://telus.com"
    tag="Example category"
    date="Dec 25, 2021"
    title="An article with a headline"
    description="A description in which the content of the linked article is succinctly summarised."
    fullBleedContent={{
      alt: 'Full Bleed Image Example',
      src: '/universal-design-system/img/pigs-allium-lo.png'
    }}
  />
  <StoryCard
    href="https://telus.com"
    tag="Example category"
    date="Dec 25, 2021"
    title="An article with a headline"
    description="A description in which the content of the linked article is succinctly summarised."
    fullBleedContent={{
      alt: 'Full Bleed Image Example',
      src: '/universal-design-system/img/pigs-allium-lo.png'
    }}
  />
  <StoryCard
    href="https://telus.com"
    tag="Example category"
    date="Dec 25, 2021"
    title="An article with a headline"
    description="A description in which the content of the linked article is succinctly summarised."
    fullBleedContent={{
      alt: 'Full Bleed Image Example',
      src: '/universal-design-system/img/pigs-allium-lo.png'
    }}
  />
</StackView>
```

## Feedback

<Feedback component="StoryCard" />
