Componentticket-stub0.55 KB gzipZero dependencies
Price Tag
Price tag with eyelet string hole and sale mark.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add price-tagOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { PriceTag } from "@/components/ui/price-tag"; <PriceTag price="45.00" originalPrice="60.00" sale label="VIP ADMISSION" />Source code
price-tag.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxprice-tag.tsx59 lines
import * as React from "react";import { cn } from "./lib/utils"; export interface PriceTagProps extends React.HTMLAttributes<HTMLDivElement> { price: string; originalPrice?: string; currency?: string; label?: string; sale?: boolean; className?: string;} export function PriceTag({ price, originalPrice, currency = "$", label = "ADMISSION", sale = false,Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { PriceTag } from "@/components/ui/price-tag"; <PriceTag />| Prop | Type | Description |
|---|---|---|
| price | string | Configures price. |
| originalPrice | string | Configures original price. |
| currency | string | Configures currency. (Default: "$") |
| label | string | Accessible label text rendered or attached to the control. (Default: "ADMISSION") |
| sale | boolean | Toggles sale. (Default: false) |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |