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 🙏

© 2025 – Pkg Stats / Ryan Hefner

japanese-vkeyboard

v0.5.3

Published

A Japanese virtual keyboard component for React applications

Downloads

212

Readme

日本語仮想キーボード (Japanese Virtual Keyboard)

仮想キーボードの画像

概要

このパッケージは、Webアプリケーション向けの日本語入力用仮想キーボードコンポーネントを提供します。React環境で簡単に統合でき、ひらがな入力と数字入力(テンキー)の両方をサポートしています。

特徴

  • ✅ ひらがな入力とテンキー入力の切り替え機能
  • 🔄 Google IME APIを使用した漢字変換機能
  • 📱 レスポンシブデザイン対応
  • 🌓 ダークモード対応
  • ⚛️ React/Next.jsプロジェクトとの簡単な統合

インストール

npm  install  japanese-vkeyboard
# または
yarn  add  japanese-vkeyboard

基本的な使用方法

"use client"

import { useState } from  "react"
import { VKeyboard } from  "japanese-vkeyboard"
import  "japanese-vkeyboard/dist/virtual-keyboard.css"

export  default  function  ExamplePage() {
const [inputValue, setInputValue] =  useState("")
const  handleChange  = (value:  string) => { setInputValue(value) }
return (
	<div  className="container mx-auto p-4">
		<h1  className="text-2xl font-bold mb-4">VKeyboard Example</h1>
		<div  className="mb-4">
			<input type="text" value={inputValue} onChange={(e) =>  setInputValue(e.target.value)} className="w-full p-2 border border-gray-300 rounded" placeholder="Input will appear here" />
		</div>
		<VKeyboard  value={inputValue} onChange={handleChange} keyboardType="hirakey"  enableConversion={true} />
	</div>
		)
}

プロパティ

| プロパティ | 型 | デフォルト値 | 説明 | |------------|------|--------------|------| | value | string | - | 現在の入力値 | | onChange | (value: string) => void | - | 入力値が変更されたときに呼び出される関数 | | keyboardType | "hirakey" | "tenkey" | "hirakey" | キーボードのタイプ | | enableConversion | boolean | true | 漢字変換機能の有効/無効 | | className | string | - | カスタムCSSクラス名 | | disabled | boolean | false | キーボードの無効化 |

ファイル構造

japanese-vkeyboard/
├── src/
│   ├── components/
│   │   ├── HiraganaKeyboard.tsx
│   │   └── TenkeyKeyboard.tsx
│   ├── hooks/
│   │   ├── useDiacriticState.ts
│   │   ├── useKeyboardLogic.ts
│   │   ├── useKeyboardNavigation.ts
│   │   └── useKeyboardState.ts
│   ├── icons/
│   │   └── DeleteIcon.tsx
│   ├── styles/
│   │   └── virtual-keyboard.module.css
│   ├── utils/
│   │   ├── constants.ts
│   │   ├── types.ts
│   │   └── utils.ts
│   ├── VirtualKeyboard.tsx
│   ├── client.ts
│   └── index.ts
├── app/
│   ├── example.tsx
│   ├── layout.tsx
│   └── page.tsx
├── tsconfig.json
├── rollup.config.js
├── postcss.config.js
└── package.json

カスタマイズ

スタイルのカスタマイズは、CSSモジュールを上書きすることで可能です。詳細はスタイリングガイドを参照してください。

ライセンス

MITライセンスの下で公開されています。詳細はLICENSEファイルを参照してください。

コントリビューション

バグ報告や機能リクエストはIssuesページにお願いします。プルリクエストも歓迎します!