Naingcn

Myanmar NRC Input

A simple myanmar nrc input component.

Installation

npx shadcn@latest add https://naingcn.vercel.app/r/nrc-input.json

Usage

import {
  NRCInput,
  NRCStateInput,
  NRCTownshipInput,
  NRCTypeInput,
  NRCNumberInput,
} from '@/components/ui/nrc-input';
const [nrc, setNrc] = React.useState('');

return (
  <NRCInput
    className='grid gap-1 w-full max-w-[350px]'
    defaultValue='13/TAKANA(N)112233'
    onValueChange={setNrc}
  >
    <div className='w-full flex gap-1 flex-wrap'>
      <NRCStateInput className='grow' />
      <NRCTownshipInput className='grow' />
      <NRCTypeInput className='grow' />
    </div>
    <NRCNumberInput />
  </NRCInput>
);

API Reference

NRCInput

PropTypeDefault
lang?"mm" | "en""en"
defaultValue?stringundefined
onValueChange?(nrc: string) => voidundefined