Componentform0.78 KB gzipZero dependencies
Address Form
Address form grid: street, city, district, postal, country.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add address-formOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { AddressForm } from "@/components/ui/address-form"; <AddressForm />Source code
address-form.tsx + 1 helperZero 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
| Prop | Type | Description |
|---|---|---|
| value | Partial<AddressFormValue> | Controlled value. (Default: {}) |
| onValueChange | (value: Partial<AddressFormValue>) => void | Callback invoked on value change. |