Card

Card surface for composing login flows, sign-up forms, pricing tiles, payment methods, empty states, and stat showcases.

import {
Card,
CardAction,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@plexui/vue/components/Card";

Examples

Overview

Project activity

Your team opened 12 issues and closed 8 pull requests over the last 7 days.

Login

Log in to your account

Enter your email below to log in to your account.

Create project

Create project

Deploy a new project in one-click with sensible defaults.

Where your functions and database will live.

Payment Method

Payment Method

All transactions are secure and encrypted

Enter your 16-digit card number

Billing Address

The billing address associated with your payment method

No team members (empty state)

No team members
Invite your team to collaborate on this project.

How did you hear about us?

How did you hear about us?

Select the option that best describes how you heard about us.

Processing your request

Processing your request
Please wait while we process your request. Do not refresh the page.

Pricing

Starter

$0/ month

  • 1 project
  • Community support
  • Plex UI core

Pro

$19/ month

  • Unlimited projects
  • Priority support
  • Custom domains
  • Early components

Anatomy

<Card>
  <CardHeader>
    <CardTitle />
    <CardDescription />
    <CardAction />  <!-- optional top-right slot -->
  </CardHeader>
  <CardContent />
  <CardFooter />
</Card>

API

Card

PropTypeDefaultDescription
variant"outline" | "solid" | "ghost""outline"Visual variant
size"sm" | "md" | "lg""md"Padding scale
interactivebooleanfalseAdds hover and focus affordances. Automatic when href is set.
hrefstringRenders the Card as a link via the linkComponent of PlexUIProvider. A link component that takes to, such as RouterLink, gets it as to.
externalbooleanauto-detectedForces target="_blank" and rel="noopener noreferrer" when href is set.
asComponent | "a"Overrides the link component.
classstringApplied to the root element

All other attributes and listeners fall through to the root <div> or link.

Compound parts

PartElementPurpose
CardHeader<div>Title + description + optional action
CardTitle<h3>Card heading
CardDescription<p>Subtitle / explanation
CardContent<div>Primary body region
CardFooter<div>Trailing actions row
CardAction<div>Absolute top-right slot inside CardHeader

Styling

Card reads these component tokens. Override them at any scope to restyle it:

  • --card-background: background (default var(--color-surface))
  • --card-background-hover: background hover (default var(--color-surface-secondary))
  • --card-border-color: border color (default var(--color-border))
  • --card-border-color-hover: border color hover (default var(--color-border-primary-outline-hover))
  • --card-description-color: description color (default var(--color-text-tertiary))
  • --card-description-font-size: description font size (default var(--font-text-sm-size))
  • --card-font-size: font size (default var(--font-text-sm-size))
  • --card-radius: radius (default var(--radius-xl))
  • --card-text-color: text color (default var(--color-text))
  • --card-title-color: title color (default var(--color-text))
  • --card-title-font-size: title font size (default var(--font-heading-xs-size))
  • --card-title-font-weight: title font weight (default var(--font-weight-semibold))