Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Card

The Card component groups a title with optional actions. It can also make the entire surface interactive.

Import

1
import { Card } from '@payloadcms/ui'

Basic usage

Loading component example…

Actions

Use the actions prop for controls that act on the card without activating the full card surface.

Loading component example…

When using href or onClick, provide buttonAriaLabel so the full-card control has an accessible name.

Common props

These are the props most commonly used with this component. See its exported types in @payloadcms/ui for the complete list.

Prop

Type

Default

Description

title *

string

Visible card title.

titleAs

ElementType

'div'

Sets the element used for the title.

actions

ReactNode

Displays controls on the trailing edge.

href

string

Makes the full card navigate to the given path.

onClick

() => void

Makes the full card perform an action.

buttonAriaLabel

string

Labels the full-card interactive control.

* An asterisk denotes that a prop is required.

Was this page helpful?

Next

CodeEditor