# Opens in dialog

> A footer button launches a modal with subscription detail.

A shadcn/ui block from the [@flx](https://ui.flexnative.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/flx/card-07).

- Page, with a live preview: https://shadcn.exchange/r/flx/card-07
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/flx/card-07-light-8be31e19b443ddee.png
- Registry item: https://ui.flexnative.com/r/card-07.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/card-07.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `card`, `button`, `dialog`

## Files

### `registry/patterns/card/card-07.tsx`

```tsx
import { Button } from '@/components/ui/button'
import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from '@/components/ui/card'
import {
  Dialog,
  DialogClose,
  DialogContent,
  DialogDescription,
  DialogFooter,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from '@/components/ui/dialog'

export function Card07() {
  return (
    <Card className="w-full max-w-sm">
      <CardHeader>
        <CardTitle>Pro plan</CardTitle>
        <CardDescription>Billed annually · renews Jan 2027</CardDescription>
      </CardHeader>
      <CardContent className="text-muted-foreground">
        Unlimited projects, priority support, and advanced analytics for your
        whole team.
      </CardContent>
      <CardFooter>
        <Dialog>
          <DialogTrigger
            render={<Button className="w-full">Manage subscription</Button>}
          />
          <DialogContent className="sm:max-w-md">
            <DialogHeader>
              <DialogTitle>Manage subscription</DialogTitle>
              <DialogDescription>
                Your Pro plan is active. Changes take effect on the next billing
                cycle.
              </DialogDescription>
            </DialogHeader>
            <div className="flex items-center justify-between rounded-lg border p-4">
              <div className="flex flex-col">
                <span className="font-medium">Pro · Annual</span>
                <span className="text-muted-foreground text-sm">
                  $290.00 / year
                </span>
              </div>
              <span className="text-2xl font-semibold tabular-nums">$290</span>
            </div>
            <DialogFooter>
              <DialogClose render={<Button variant="outline">Close</Button>} />
              <Button variant="destructive">Cancel plan</Button>
            </DialogFooter>
          </DialogContent>
        </Dialog>
      </CardFooter>
    </Card>
  )
}
```
