ui/card.tsx

shadcnspace · src/components/ui/card.tsx · typescript · MIT
ui

Module exposing: Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter

// Source: https://github.com/shadcnspace/shadcnspace | License: MIT | Copyright 2026 Shadcn Space
// Provided via justclaw.it.com; keep this notice with the code.
import * as React from "react"

import { cn } from "@/lib/utils"

function Card({
  className,
  size = "default",
  ...props
}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
  return (
    <div
      data-slot="card"
      data-size={size}
      className={cn(
        "group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:fir

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key