Componentform0.86 KB gzipZero dependencies

Shipping Options

Shipping option radio cards with carrier, duration and price.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add shipping-options

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { ShippingOptions } from "@/components/ui/shipping-options"; <ShippingOptions />

Source code

shipping-options.tsx + 1 helper

Zero 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 />
PropTypeDescription
optionsShippingOption[]Selectable options list. (Default: [])
valuestringControlled value.
defaultValuestringInitial value when uncontrolled.
onValueChange(id: string) => voidCallback invoked on value change.