EditorialCard
Renders an editorial content card in one of several layout variants, composing imagery, title, and subtitle into a single linkable promotional tile.
Featured collection
Handcrafted tiles
Usage
import { EditorialCard, EditorialCardContent, EditorialCardContentProps, EditorialCardImageProps, EditorialCardMedia, EditorialCardMediaProps, EditorialCardProps, EditorialCardStack, EditorialCardStackProps, EditorialCardTicker, EditorialCardTickerProps, EditorialCardVariant } from "@desk/ui/compositions/editorial-card";Best practices
Match the media prop to
variant:ticker/stackconsumeimages[](stack uses the first three), whilemediausesimageSrc/videoSrc— passing the wrong one renders empty media.Pass
renderImage(wrappingnext/image) in Next.js — the default is a plain<img>and skips Next optimization; givemediaimages a meaningfulalt.Set
hrefto make the whole card a single link (it wraps in an<a>); don't nest additional links/buttons inside — useEditorialCardfor promo tiles, plainCardfor neutral content.
Props
EditorialCard
| Prop | Type | Default | Description |
|---|---|---|---|
| alt | string | Alt text for media variant | |
| className | string | Optional class name | |
| href | string | Optional link URL - wraps card in anchor if provided | |
| imageSrc | string | Single image URL for media variant | |
| images | string[] | Array of image URLs for ticker and stack variants | |
| renderImage | (props: EditorialCardImageProps) => ReactNode | Custom image renderer for framework-specific image components (e.g., next/image). Defaults to standard img element. | |
| subtitle | string | Optional subtitle text (appears above title) | |
| tickerVelocity | number | Velocity for ticker animation (pixels per second) | |
| title | string | Main title text | |
| variant | EditorialCardVariant | Visual variant of the card | |
| videoSrc | string | Video URL for media variant (takes precedence over imageSrc) |
EditorialCardContent
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | ||
| subtitle | string | ||
| title | string |
EditorialCardMedia
| Prop | Type | Default | Description |
|---|---|---|---|
| alt | string | Alt text for the image | |
| className | string | Optional class name for the container | |
| imageSrc | string | Image URL | |
| renderImage | (props: EditorialCardImageProps) => ReactNode | Custom image renderer (e.g., for next/image). Defaults to standard img element. | |
| videoSrc | string | Video URL (takes precedence over imageSrc) |
EditorialCardStack
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | Optional class name for the container | |
| images | string[] | Array of image URLs (uses first 3) | |
| renderImage | (props: EditorialCardImageProps) => ReactNode | Custom image renderer (e.g., for next/image). Defaults to standard img element. |
EditorialCardTicker
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | Optional class name for the container | |
| images | string[] | Array of image URLs to display in the ticker grid | |
| renderImage | (props: EditorialCardImageProps) => ReactNode | Custom image renderer (e.g., for next/image). Defaults to standard img element. | |
| velocity | number | Velocity for the ticker animation (pixels per second) |
Also exports
- interface
EditorialCardContentProps - interface
EditorialCardImageProps - interface
EditorialCardMediaProps - interface
EditorialCardProps - interface
EditorialCardStackProps - interface
EditorialCardTickerProps - type
EditorialCardVariant
Composition
Builds on