Componentdata0.74 KB gzipZero dependencies

Price Compare

Price comparison table across sellers with best-offer highlight.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add price-compare

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { PriceCompare } from "@/components/ui/price-compare"; <PriceCompare />

Source code

price-compare.tsx + 1 helper

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

tsxprice-compare.tsx60 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface PriceOffer {  id: string;  seller: string;  price: number;  shipping?: string;  best?: boolean;} export interface PriceCompareProps extends React.HTMLAttributes<HTMLDivElement> {  title: string;  offers: PriceOffer[];  currency?: string;}

Props

Interactive Prop Playground

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

tsx3 lines
import { PriceCompare } from "@/components/ui/price-compare"; <PriceCompare />
PropTypeDescription
titlestringPrimary heading or title text. (Default: "")
offersPriceOffer[]Configures offers. (Default: [])
currencystringConfigures currency. (Default: "$")