Dark Light
System
Default LBBW Jira Confluence Source Code
Share
Playground

Card

<afp-card> Since 1.0.0 stable This component uses the light DOM, so its markup and styles are part of the regular document flow.

Cards are surfaces that display content and actions on a single topic.

lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Examples #

Variants #

Use the variant attribute to change the card's color scheme.

Neutral Brand Accent Info Error Success Warning

Appearances #

Use the appearance attribute to change the card's visual style.

Default Outlined Plain Filled Outlined Filled

Loading #

Use the loading attribute to indicate that the card content is being loaded.

With Header #

Use the header attribute to include a header section in the card.

John Doe Senior Product Manager
View Profile Send Message Schedule Meeting

John leads the product strategy for our customer experience initiatives, focusing on data-driven improvements to onboarding flows and self-service platforms. Based in Berlin, Alex has been part of the Digital Products team since 2019 and closely collaborates with cross-functional stakeholders to deliver high-impact solutions.

Use the footer attribute to include a footer section in the card.

Release 4.10 Released

This release introduces faster load times, redesigned reports, and expanded API endpoints for advanced integrations.

  • Performance improvements
  • New analytics widgets
  • API v2 enhancements
  • Stability fixes
Published: Nov 14, 2025 Read More

With Media #

Use the media attribute to include a media section in the card.

Task Banner
Onboarding Flow Optimization
Onboarding Sprint 12

We are improving the sign-up experience by reducing friction in the early customer journey. The goal is to increase trial-to-paid conversions by 10%.

Team
Open Task

Customizing #

Use CSS custom properties to adjust padding and gap sizes within the card.

User Settings

Manage your personal information and preferences
Receive product updates
Last update: 8 minutes ago Save Changes

Properties

Learn more about properties.

Name Description Reflects
appearance
Appearance of card
Type
AfpAppearance
Name Description
DEFAULT
Highlighted, primary action (default).
OUTLINED
Transparent background with a visible border.
PLAIN
Minimal, no border or background.
FILLED
Solid background, no border.
OUTLINED_FILLED
Solid background with a visible border.
AfpAppearance
Default AfpAppearance.DEFAULT
variant
Variant of card
Type
AfpVariant
Name Description
NEUTRAL
The main call-to-action.
BRAND
Less prominent than primary.
ACCENT
Secondary highlight for emphasis.
ERROR
Used for destructive or critical actions.
INFO
Conveys general information.
SUCCESS
Indicates a successful or positive action.
WARNING
Communicates cautionary actions.
AfpVariant
Default AfpVariant.NEUTRAL
media
Whether to show the media section.
Type boolean
Default false
header
Whether to show the header section.
Type boolean
Default false
footer
Whether to show the footer section.
Type boolean
Default false
loading
Whether to show the loading skeleton.
Type boolean
Default false

Slots

Learn more about slots.

Name Description
default
The default slot for card content.
media
The slot for the card media (e.g., image or video).
header
The slot for the card header.
footer
The slot for the card footer.

CSS Parts

Learn more about CSS Parts.

Name Description Selector
skeleton
The skeleton loading container.
::part(skeleton)
skeleton-media
The skeleton media item.
::part(skeleton-media)
skeleton-header
The skeleton header item.
::part(skeleton-header)
skeleton-content
The skeleton content item.
::part(skeleton-content)
skeleton-content-short
The short skeleton content item.
::part(skeleton-content-short)
skeleton-footer
The skeleton footer item.
::part(skeleton-footer)
media
The media container.
::part(media)
header
The header container.
::part(header)
content
The content container.
::part(content)
footer
The footer container.
::part(footer)

CSS Custom Properties

Name Description Default
--afp-card-padding
The padding inside the card.
--afp-space-m
--afp-card-width
The width of the card.
100%
--afp-card-media-height
The height of the card media.
15rem
--afp-card-gap
The gap between card sections.
--afp-space-2xs
--afp-card-border-radius
The border radius of the card.
--afp-border-radius-m
--afp-card-animation
The animation for the card loading skeleton.
afp-shimmer 1.5s infinite linear

Dependencies

The component automatically brings in the listed items, including any nested dependencies that may exist.

afp-icon

Importing

Using the bundle is the recommended method to include components. If you’d rather handle imports manually, you can use the code examples below.

import '@afp-design-system/core/dist/components/card/card.js';
Share
Create a link with a predefined theme that is automatically applied when the generated link is opened. Default LBBW Presentation Mode
Abort Copy Link