# Card

shadcn's card in Candor's theme.

- Registry name: `card` (`@candor/card`)
- Tier: Pro. Installing it needs a Pro, Premium or Team licence key: the person runs `npx candor-ui key <key>` themselves; never ask for the key in chat or write it to a file.
- Docs: https://candor.themethodic.com/docs/card

## Install

```bash
npx candor-ui add card
```

Run `npx candor-ui@latest init` once first (https://candor.themethodic.com/get-started.md). Without the CLI: `npx shadcn@latest add @candor/card`.
It brings in: utils.

## Example

```tsx
"use client"

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

export default function Example() {
  return (
    <Card className="w-full max-w-sm">
      <CardHeader>
        <CardTitle>Add region to customers</CardTitle>
        <CardDescription>Migration 0142 on Acme API Staging</CardDescription>
        <CardAction>
          <Button variant="ghost" size="sm">
            View diff
          </Button>
        </CardAction>
      </CardHeader>
      <CardContent className="text-sm">
        Adds a nullable <code className="font-mono text-xs">region</code> column and backfills 18,240 rows. Tests passed on Staging.
      </CardContent>
      <CardFooter className="gap-2">
        <Button size="sm">Request approval</Button>
        <Button size="sm" variant="outline">
          Discard
        </Button>
      </CardFooter>
    </Card>
  )
}
```

## <Card>

No props.

Also takes the props of `React.ComponentProps<"div">`.

## <CardHeader>

No props.

Also takes the props of `React.ComponentProps<"div">`.

## <CardFooter>

No props.

Also takes the props of `React.ComponentProps<"div">`.

## <CardTitle>

No props.

Also takes the props of `React.ComponentProps<"div">`.

## <CardAction>

No props.

Also takes the props of `React.ComponentProps<"div">`.

## <CardDescription>

No props.

Also takes the props of `React.ComponentProps<"div">`.

## <CardContent>

No props.

Also takes the props of `React.ComponentProps<"div">`.

## Rules for using Candor UI

- Components take plain typed data. Never pass model output as HTML or render it as a link; messages are typed blocks.
- A control that can't be used says why: wrap it in `<Locked reason="…">`, don't just disable it.
- Don't show a value you don't have: leave it out (it renders as —) rather than guess. An estimate is labelled as one.
- Nothing is pre-selected in a decision a person makes, and the agent is named from your app's data, never from model output.
- Your app's words go in `LocaleProvider` (fixed strings) and `TermsProvider` (nouns); entity kinds and agent roles in `EntityKindsProvider` and `AgentRolesProvider`.
