Componentdata0.74 KB gzipZero dependencies
Price Compare
Price comparison table across sellers with best-offer highlight.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add price-compareOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { PriceCompare } from "@/components/ui/price-compare"; <PriceCompare />Source code
price-compare.tsx + 1 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| title | string | Primary heading or title text. (Default: "") |
| offers | PriceOffer[] | Configures offers. (Default: []) |
| currency | string | Configures currency. (Default: "$") |