Componentticket-stub0.55 KB gzipZero dependencies

Price Tag

Price tag with eyelet string hole and sale mark.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add price-tag

Or install the full npm package:

npm install bigbullui

Usage

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 helper

Zero 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 />
PropTypeDescription
pricestringConfigures price.
originalPricestringConfigures original price.
currencystringConfigures currency. (Default: "$")
labelstringAccessible label text rendered or attached to the control. (Default: "ADMISSION")
salebooleanToggles sale. (Default: false)
classNamestringOptional Tailwind or custom CSS classes merged with component styles.