Skip to main content

StoryCard

Library
Allium Design Systemweb-only
Repository
github.com/telus/allium-design-system
Package
npmjs.com/package/@telus-uds/ds-allium
Package version
1.14.0
Loading...

Introduction

import { StoryCard } from '@telus-uds/ds-allium'

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

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:
Loading...
caution

Note that at the moment Video component does not provide perfect experience when used within a clickable cards (PreviewCard, StoryCard) with href set: the volume and progress sliders can be clicked but are not draggable. As a workaround, one can use onPress prop instead href to organize navigation in such cases.

Feel free to follow https://github.com/telus/allium-design-system/issues/6 if you would like to be up to date on the state of this issue.

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

This component is currently only supported on web.

Figma

Props

NameTypeDefaultDescription
date*stringText stating the date a story was published.
description*stringText giving a short description of the story. One paragraph of plain text.
fullBleedContentFullBleedContent.propTypes || {}fullBleedImageFull bleed image to be placed on the card.
fullBleedImageFullBleedContent.propTypes || {}Full bleed image to be placed on the card, deprecated in favor of 'fullBleedContent'. @deprecated
hrefstringThe URL of the story to be navigated to. Note that 'Video' component does not play well when used within a 'StoryCard' with 'href' prop set (the volume and progress sliders can be clicked but are not draggable). Please use 'onPress' prop instead 'href' to organize navigation in cases like this. @see https://github.com/telus/allium-design-system/issues/6
onPressfuncOptional function to be called on press e.g. for within-page navigation.
tagstringText stating the category of the content.
title*stringText stating the title or headline of the story.

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 StoryCards in a responsive StackView that flips from horizontal to vertical based on viewport:

import { StackView, StoryCard } from '@telus-uds/ds-allium'
Loading...

Feedback