Componentdata0.82 KB gzipZero dependencies

Subscription Card

Subscription card: plan, renewal date, features, cancel.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add subscription-card

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { SubscriptionCard } from "@/components/ui/subscription-card"; <SubscriptionCard />

Source code

subscription-card.tsx + 1 helper

Zero 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 />
PropTypeDescription
planstringConfigures plan.
pricestringConfigures price.
cyclestringConfigures cycle.
renewDatestringConfigures renew date.
featuresstring[]Configures features. (Default: [])
onCancel() => voidCallback invoked on cancel.