Componentform0.78 KB gzipZero dependencies

Address Form

Address form grid: street, city, district, postal, country.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add address-form

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { AddressForm } from "@/components/ui/address-form"; <AddressForm />

Source code

address-form.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxaddress-form.tsx61 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface AddressFormValue {  street: string;  city: string;  state?: string;  postal: string;  country: string;} export interface AddressFormProps extends Omit<React.HTMLAttributes<HTMLFormElement>, "onChange"> {  value?: Partial<AddressFormValue>;  onValueChange?: (value: Partial<AddressFormValue>) => void;} 

Props

PropTypeDescription
valuePartial<AddressFormValue>Controlled value. (Default: {})
onValueChange(value: Partial<AddressFormValue>) => voidCallback invoked on value change.