passport-input
domain-ui/passport-inputFreeComponent
domain-ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/teurons/domain-ui/main/apps/web/public/r/passport-input.jsonSource
1"use client";23import { useId } from "react";4import {5 RegexInput,6 type RegexInputProps,7} from "@/components/domain-ui/regex-input";8import { Label } from "@/components/ui/label";910const INDIAN_PASSPORT_REGEX = /^[A-Z][0-9]{7}$/;1112export function PassportInput({13 showLabel = true,14 ...props15}: Omit<RegexInputProps, "regex"> & { showLabel?: boolean }) {16 const generatedId = useId();17 const id = props.id || generatedId;1819 if (!showLabel) {20 return <RegexInput regex={INDIAN_PASSPORT_REGEX} {...props} id={id} />;21 }2223 return (24 <div className="*:not-first:mt-2">25 <Label htmlFor={id}>Indian Passport</Label>26 <RegexInput regex={INDIAN_PASSPORT_REGEX} {...props} id={id} />27 </div>28 );29}
What it pulls in
Other registry items
Files it writes
More from domain-ui
All 16 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| pan-inputpan-input | domain-ui | Components | Free | no deps | |
| pan-input-incrementalpan-input-incremental | domain-ui | Components | Free | no deps | |
| passport-input-incrementalpassport-input-incremental | domain-ui | Components | Free | no deps | |
| phone-inputphone-input | domain-ui | Components | Free | 2 deps | |
| portfolio-chartportfolio-chart | domain-ui | Components | Free | no deps | |
| regex-inputregex-input | domain-ui | Components | Free | no deps · 2 files | |
| regex-input-incrementalregex-input-incremental | domain-ui | Components | Free | no deps · 5 files | |
| responsive-resizable-previewresponsive-resizable-preview | domain-ui | Components | Free | no deps · 3 files |
