Componentform0.86 KB gzipZero dependencies
Shipping Options
Shipping option radio cards with carrier, duration and price.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add shipping-optionsOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { ShippingOptions } from "@/components/ui/shipping-options"; <ShippingOptions />Source code
shipping-options.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxshipping-options.tsx70 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ShippingOption { id: string; carrier: string; duration: string; price: string; recommended?: boolean;} export interface ShippingOptionsProps extends React.HTMLAttributes<HTMLDivElement> { options: ShippingOption[]; value?: string; defaultValue?: string; onValueChange?: (id: string) => void;Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { ShippingOptions } from "@/components/ui/shipping-options"; <ShippingOptions />| Prop | Type | Description |
|---|---|---|
| options | ShippingOption[] | Selectable options list. (Default: []) |
| value | string | Controlled value. |
| defaultValue | string | Initial value when uncontrolled. |
| onValueChange | (id: string) => void | Callback invoked on value change. |