Backpack UI
Components
Cards
TeaserCard

TeaserCard

The TeaserCard component is a clean, minimal card component designed to display images and titles. It also supports custom link rendering, hover effects, and an optional animated arrow.


Image description

Importing

To import the TeaserCard component, use the following import statement:


_10
import { TeaserCard } from '@ef-global/backpack/TeaserCard';

Props

NameTypeDefaultDescription
childrenArray of CardImage and/or CardTitle elements or CardImage-The child components of the TeaserCard, including images and titles.
renderCustomLinkReact.ElementType (optional)LinkA custom link component to be used instead of the default Link component.
shadowCardShadowValues (optional)'off'The shadow style for the card.
radiusCardBorderRadiusValues (optional)-The border radius for the card.
arrowboolean (optional)-Whether to display an animated arrow when hovered.
hrefstring-The URL to navigate to when the card is clicked.
target'_blank' (optional)-The target attribute for the link, e.g., _blank to open the link in a new window.

Usage

To use the TeaserCard component, provide the required child components as children prop and any optional props as needed:


_10
<TeaserCard href="https://example.com" target="_blank" arrow>
_10
<CardImage src="image.jpg" alt="Image description" />
_10
<CardTitle>Title</CardTitle>
_10
</TeaserCard>

Examples

With custom border radius


Image description

_10
<TeaserCard
_10
href="https://example.com"
_10
target="_blank"
_10
radius="m"
_10
>
_10
<CardImage src="image.jpg" alt="Image description" />
_10
<CardTitle>Title</CardTitle>
_10
</TeaserCard>

With shadow


Image description

_10
<TeaserCard
_10
href="https://example.com"
_10
target="_blank"
_10
shadow='enabled'
_10
>
_10
<CardImage src="image.jpg" alt="Image description" />
_10
<CardTitle>Title</CardTitle>
_10
</TeaserCard>