# Update Plan Card
URL: /docs/components/update-plan/update-plan-card
The Update Plan Card component provides a compact, card-based interface for users to upgrade or change their subscription plan. It's perfect for embedding in dashboards or sidebars where space is limited.
***
title: Update Plan Card
description: The Update Plan Card component provides a compact, card-based interface for users to upgrade or change their subscription plan. It's perfect for embedding in dashboards or sidebars where space is limited.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```tsx title="src/components/update-plan-card-demo.tsx"
"use client";
import { UpdatePlanCard } from "@/components/billingsdk/update-plan-card";
import { plans } from "@/lib/billingsdk-config";
export function UpdatePlanCardDemo() {
return (
{
console.log("Upgrade plan to", planId);
}}
/>
);
}
```
## Installation
```bash
npx shadcn@latest add @billingsdk/update-plan-card
```
```bash
pnpm dlx shadcn@latest add @billingsdk/update-plan-card
```
```bash
yarn dlx shadcn@latest add @billingsdk/update-plan-card
```
```bash
bunx shadcn@latest add @billingsdk/update-plan-card
```
```bash
npx @billingsdk/cli add update-plan-card
```
```bash
pnpm dlx @billingsdk/cli add update-plan-card
```
```bash
yarn dlx @billingsdk/cli add update-plan-card
```
```bash
bunx @billingsdk/cli add update-plan-card
```
## Usage
```tsx
import { UpdatePlanCard } from "@/components/billingsdk/update-plan-card";
import { plans } from "@/lib/billingsdk-config";
```
```tsx
{
// Handle plan change
console.log('Plan changed to:', planId);
}}
title="Upgrade Your Plan"
/>
```
## Props
| Prop | Type | Required | Description |
| -------------- | -------------------------- | -------- | --------------------------------------------------- |
| `currentPlan` | `Plan` | ✅ | The user's current plan object |
| `plans` | `Plan[]` | ✅ | Array of available plans to choose from |
| `onPlanChange` | `(planId: string) => void` | ✅ | Callback function when a plan is selected |
| `className` | `string` | ❌ | Additional CSS classes for styling |
| `title` | `string` | ❌ | Custom title for the card (default: "Upgrade Plan") |
## Theming
The update plan card component is styled using the `shadcn/ui` library. You can customize the colors and fonts by overriding the CSS variables. You can also get the theme from the [Theming](/docs/theming) page.
## Example
```tsx title="src/components/update-plan-card-demo.tsx"
"use client";
import { UpdatePlanCard } from "@/components/billingsdk/update-plan-card";
import { plans } from "@/lib/billingsdk-config";
export function UpdatePlanCardDemo() {
return (
{
console.log("Upgrade plan to", planId);
}}
/>
);
}
```