npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zygapp/react-number-plate

v0.1.0

Published

Japanese license plate input component for React

Readme

React Number Plate

Japanese license plate input component for React.

日本のナンバープレート入力フィールドコンポーネント(React版)

Features

  • ✅ 4つのカラーテーマ(白、緑、黄、黒)
  • ✅ 地域選択ドロップダウン(北海道から九州まで全地域対応)
  • ✅ 分類番号入力(3桁)
  • ✅ ひらがな入力(1文字)
  • ✅ ナンバー入力(自動フォーマット: ・や-を挿入)
  • ✅ 無効化対応(disabled)
  • ✅ 必須入力対応(required)
  • ✅ TypeScript対応

Installation

npm install react-number-plate

Usage

React

import { NumberPlate } from 'react-number-plate';
import 'react-number-plate/style.css';
import { useState } from 'react';

function App() {
  const [value, setValue] = useState('');

  return (
    <NumberPlate
      value={value}
      onChange={setValue}
      color="white" // 'white' | 'green' | 'yellow' | 'black'
      disabled={false}
      required={false}
    />
  );
}

Next.js (App Router)

'use client';

import { NumberPlate } from 'react-number-plate';
import 'react-number-plate/style.css';
import { useState } from 'react';

export default function Page() {
  const [value, setValue] = useState('');

  return (
    <NumberPlate
      value={value}
      onChange={setValue}
      color="white"
      disabled={false}
      required={false}
    />
  );
}

Note: This component uses React hooks (useState, useEffect, useCallback), so it must be used in a Client Component in Next.js. Add the 'use client' directive at the top of your file.

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | value | string | '' | ナンバープレートの値(例: "品川 300 ぬ 12-34") | | onChange | (value: string) => void | - | 値が変更されたときのコールバック | | separate | string | ' ' | 各フィールドの区切り文字 | | color | 'white' \| 'green' \| 'yellow' \| 'black' | 'white' | カラーテーマ | | disabled | boolean | false | 無効化フラグ | | required | boolean | false | 必須入力フラグ |

Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build library
npm run build:lib

# Preview built demo
npm run preview

Build Output

The library is built with the following files:

  • dist/react-number-plate.es.js - ES module format
  • dist/react-number-plate.umd.js - UMD format for browser usage
  • dist/style.css - Component styles (includes embedded fonts)
  • dist/index.d.ts - TypeScript type definitions

Note: The CSS file is approximately 12MB due to embedded Japanese fonts. This ensures the component displays correctly without requiring separate font downloads.

License

MIT