jusho 住所

下のフォームに郵便番号を入力してください。設定もフィールドの指定も要らず、残りは自動で埋まります。Type a Japanese postcode into the form below. Everything else fills itself, with no configuration and no field wiring.

データdata postcodes ライブラリplugin 3.0 KB gzipped 出典source 日本郵便Japan Post

よくある日本の入力フォームA fairly typical Japanese checkout form

住所欄Address fields
フリガナ欄フリガナ fields

検出したフィールドWhat the plugin found

フィールドを検出しています…Discovering fields…

取得した住所Resolved address

まだ検索していません。Nothing looked up yet.

通信:先頭3桁につき1回だけNetwork: one shard per prefix, then nothing

まだ通信していません。No requests yet.

導入はこれだけThe entire integration

npm install jusho-jp

import { autofill } from 'jusho-jp';

autofill({ baseUrl: 'https://jusho.srh.workers.dev' });

フィールドは autocomplete 属性、次に nameid の慣習、最後にラベルの文言から判別します。値はネイティブのセッター経由で書き込むため、React や Vue でも検知されます。すでに入力済みの欄は上書きしないので、試してみてください。 Fields are found by autocomplete attribute, then name/id convention, then label text. Values go through the native setter so React and Vue notice. A field you have already typed into is never overwritten, so try it.