Componentform0.91 KB gzipZero dependencies

Installment Picker

Installment plan picker: months, monthly amount, total.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add installment-picker

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { InstallmentPicker } from "@/components/ui/installment-picker"; <InstallmentPicker />

Source code

installment-picker.tsx + 1 helper

Zero 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 />
PropTypeDescription
plansInstallmentPlan[]Configures plans. (Default: [])
valuenumberControlled value.
defaultValuenumberInitial value when uncontrolled.
onValueChange(months: number) => voidCallback invoked on value change.