Componentticket-stub0.84 KB gzipZero dependencies

Coupon

Discount coupon with scissor cutout lines and promo code copy.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add coupon

Or install the full npm package:

npm install bigbullui

Usage

tsx8 lines
import { Coupon } from "@/components/ui/coupon"; <Coupon  code="BIGBULL25"  discount="25%"  title="FESTIVAL PASS"  expires="31 DEC"/>

Source code

coupon.tsx + 2 helpers

Zero third-party dependencies (3 local files shown in tabs below).

tsxcoupon.tsx90 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils";import { useCopy } from "./lib/hooks"; export interface CouponProps extends React.HTMLAttributes<HTMLDivElement> {  code: string;  discount: string;  title: string;  subtitle?: string;  expires?: string;  onApply?: (code: string) => void;  className?: string;} export function Coupon({  code,

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { Coupon } from "@/components/ui/coupon"; <Coupon />
PropTypeDescription
codestringConfigures code.
discountstringConfigures discount.
titlestringPrimary heading or title text.
subtitlestringSupporting secondary heading text.
expiresstringConfigures expires.
onApply(code: string) => voidCallback invoked on apply.
classNamestringOptional Tailwind or custom CSS classes merged with component styles.