Componentform0.91 KB gzipZero dependencies
Installment Picker
Installment plan picker: months, monthly amount, total.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add installment-pickerOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { InstallmentPicker } from "@/components/ui/installment-picker"; <InstallmentPicker />Source code
installment-picker.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxinstallment-picker.tsx73 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface InstallmentPlan { months: number; monthly: string; total: string; rate?: string;} export interface InstallmentPickerProps extends React.HTMLAttributes<HTMLDivElement> { plans: InstallmentPlan[]; value?: number; defaultValue?: number; onValueChange?: (months: number) => void;}Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { InstallmentPicker } from "@/components/ui/installment-picker"; <InstallmentPicker />| Prop | Type | Description |
|---|---|---|
| plans | InstallmentPlan[] | Configures plans. (Default: []) |
| value | number | Controlled value. |
| defaultValue | number | Initial value when uncontrolled. |
| onValueChange | (months: number) => void | Callback invoked on value change. |