Componentdata0.82 KB gzipZero dependencies
Subscription Card
Subscription card: plan, renewal date, features, cancel.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add subscription-cardOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { SubscriptionCard } from "@/components/ui/subscription-card"; <SubscriptionCard />Source code
subscription-card.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxsubscription-card.tsx54 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface SubscriptionCardProps extends React.HTMLAttributes<HTMLDivElement> { plan: string; price: string; cycle: string; renewDate: string; features?: string[]; onCancel?: () => void;} /** Subscription tier card: plan + renewal date + features + cancel. */export function SubscriptionCard({ plan, price, cycle, renewDate, features = [], onCancel, className, ...props }: SubscriptionCardProps) { return ( <div className={cn("w-full max-w-sm rounded-lg border-2 border-dashed border-accent/40 bg-card p-5", className)} {...props}>Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { SubscriptionCard } from "@/components/ui/subscription-card"; <SubscriptionCard />| Prop | Type | Description |
|---|---|---|
| plan | string | Configures plan. |
| price | string | Configures price. |
| cycle | string | Configures cycle. |
| renewDate | string | Configures renew date. |
| features | string[] | Configures features. (Default: []) |
| onCancel | () => void | Callback invoked on cancel. |