VibeUI
ComponentsDocs
VibeUI

Components with taste, that you own. Copy the source, retint the tokens, keep every line.

Library

  • All components
  • Signature pieces
  • Text effects
  • Footers

Docs

  • Introduction
  • Installation
  • Theming
  • CLI

Project

  • GitHub
  • Agents and MCP
  • Issues
  • MIT license
© 2026 VibeUI · MIT licensed
  1. Components
  2. Data & surfaces
  3. Card

Card

Surface container with header, content and footer slots.

Data & surfacesServer-safe6 exports
New

Interactive card

Lifts gently on hover. No glow.

Static card

For grouping content.

Header, content and footer slots compose freely.

Install

bash
npx @agents-npm-packages/vibeui add card --dir ./src/components/ui

Import

tsx
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@/components/ui/card"

API

Generated from the component's TypeScript types, so it always matches the source. * marks a required prop.

<Card>

also accepts every HTMLAttributes<HTMLDivElement> attribute

PropTypeDefaultDescription
interactiveboolean—Lifts and deepens the shadow on hover.

<CardHeader>

also accepts every HTMLAttributes<HTMLDivElement> attribute

No props of its own: it forwards native attributes to the element.

<CardTitle>

also accepts every HTMLAttributes<HTMLHeadingElement> attribute

No props of its own: it forwards native attributes to the element.

<CardDescription>

also accepts every HTMLAttributes<HTMLParagraphElement> attribute

No props of its own: it forwards native attributes to the element.

<CardContent>

also accepts every HTMLAttributes<HTMLDivElement> attribute

No props of its own: it forwards native attributes to the element.

<CardFooter>

also accepts every HTMLAttributes<HTMLDivElement> attribute

No props of its own: it forwards native attributes to the element.

Source

src/components/ui/card.tsx
import * as React from "react";
import { cn } from "@/lib/utils";

/** Surface container with header, content and footer slots. */
export function Card({
  className,
  interactive,
  ...props
}: React.HTMLAttributes<HTMLDivElement> & { interactive?: boolean }) {
  return (
    <div
      className={cn(
        "rounded-lg border border-line bg-surface p-6 shadow-quiet",
        interactive &&
          "transition-[box-shadow,border-color,transform] duration-300 ease-out hover:-translate-y-0.5 hover:border-line-strong hover:shadow-lift",
        className,
      )}
      {...props}
    />
  );
}

export function CardHeader({
  className,
  ...props
}: React.HTMLAttributes<HTMLDivElement>) {
  return <div className={cn("mb-4 flex flex-col gap-1.5", className)} {...props} />;
}

export function CardTitle({
  className,
  ...props
}: React.HTMLAttributes<HTMLHeadingElement>) {
  return (
    <h3
      className={cn("text-[15px] font-medium tracking-[-0.015em] text-ink", className)}
      {...props}
    />
  );
}

export function CardDescription({
  className,
  ...props
}: React.HTMLAttributes<HTMLParagraphElement>) {
  return (
    <p className={cn("text-sm leading-relaxed text-muted", className)} {...props} />
  );
}

export function CardContent({
  className,
  ...props
}: React.HTMLAttributes<HTMLDivElement>) {
  return (
    <div className={cn("text-sm leading-relaxed text-muted", className)} {...props} />
  );
}

export function CardFooter({
  className,
  ...props
}: React.HTMLAttributes<HTMLDivElement>) {
  return (
    <div
      className={cn("mt-5 flex items-center gap-2 border-t border-line pt-4", className)}
      {...props}
    />
  );
}

Exports Card and 5 more. Peer dependencies: clsx, tailwind-merge.

PreviousBar ChartNextCode Block