Componentdata0.46 KB gzipZero dependencies

Card

Double-frame surface container with header, content, and footer.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add card

Or install the full npm package:

npm install bigbullui

Usage

tsx9 lines
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; <Card>  <CardHeader>    <CardTitle>Title</CardTitle>    <CardDescription>Description</CardDescription>  </CardHeader>  <CardContent>Content</CardContent></Card>

Source code

card.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxcard.tsx45 lines
import * as React from "react";import { cn } from "./lib/utils"; export type CardProps = React.ComponentProps<"div"> & {  /** Dual-mode: false renders instantly with no motion. Default true. */  animated?: boolean;}; function Card({ className, animated = true, ...props }: CardProps) {  return (    <div      className={cn(        "rounded-lg border-[1.5px] border-foreground bg-card text-card-foreground outline-1 outline-dashed outline-offset-[-7px] min-w-0",        animated          ? "transition-shadow duration-200 hover:shadow-[5px_5px_0_0_var(--color-border)] motion-reduce:transition-none"          : "transition-none",        className      )}

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { Card } from "@/components/ui/card"; <Card />
PropTypeDescription
animatedbooleanDual-mode: false renders instantly with no motion. Default true.