# LipiKeys
> Build accessible, customizable virtual keyboards with LipiKeys. English, Nepali Unicode, offline Romanized Nepali, numeric keypads and headless React APIs in a lightweight TypeScript library.
Package: @axcore/lipikeys · License: MIT · By AlienX Studio
Status: published, v0.2.0
Repository: https://github.com/alienxstudio/lipikeys
Website: https://lipikeys.alienxstudio.com
## Install
pnpm add @axcore/lipikeys
Requires React 18 or 19. ESM only. Import "@axcore/lipikeys/styles.css" once.
## Components
- Keyboard: full keyboard. Props include input (ref | element | "focused"), value/defaultValue/onChange, language/languages/onLanguageChange, mode ("auto" | "desktop" | "mobile"), mobileBreakpoint (600), theme ("light" | "dark" | "auto"), variant ("classic" | "minimal" | "compact" | "touch" | "pos"), size ("sm" | "md" | "lg"), colors, showNumberRow, showSymbols, showLanguageSwitcher, enablePhysicalKeyboard, enableKeyRepeat, renderKey, maxLength, multiline, disabled, onEnter, onClear, onEscape, onKeyPress, onSelectionChange.
- Numpad: allowDecimal, allowNegative, decimalPlaces, maxLength, entry ("direct" | "cents"), decimalSeparator, validate.
- PinPad: length (4), randomize, onComplete, showIndicator.
- CurrencyPad: currency (ISO 4217, required), locale, entry, showDisplay.
- useKeyboard (from @axcore/lipikeys/headless): returns { rows, press(token), layout, modifiers, language, languages, value, activeCodes, setLanguage }.
## Entry points
- @axcore/lipikeys: Keyboard, useKeyboard, Numpad, PinPad, CurrencyPad, applyNumericKey, toMinorUnits, createLayout, english, colorStyle
- @axcore/lipikeys/headless: useKeyboard, pressKey, resolveKey, currentRows, initialModifiers, insertText, deleteBackward, deleteForward, moveCaret, graphemes
- @axcore/lipikeys/numeric: Numpad, PinPad, CurrencyPad, applyNumericKey, toMinorUnits, secureShuffle
- @axcore/lipikeys/layouts: createLayout, rows, english, loadLayout
- @axcore/lipikeys/layouts/ne, /layouts/ne-romanized: nepali, nepaliRomanized
- @axcore/lipikeys/transliteration: transliterateNepali, createTransliterator, nepaliRules, nepaliWords
## Languages
- en: US English QWERTY (bundled)
- ne: Nepali Unicode, xkeyboard-config symbols/np, verified for all 47 keys (lazy-loaded)
- ne-romanized: offline rule-based Romanized Nepali with a 23-word exception list; not predictive (lazy-loaded)
- Any other script: createLayout({ id, name, rows, shiftRows?, symbolRows?, widths?, labels?, lang?, capsLock?, compose?, composeChars?, mobile? })
## Examples
### Basic
```tsx
"use client";
import { useState } from "react";
import { Keyboard } from "@axcore/lipikeys";
import "@axcore/lipikeys/styles.css";
export default function Example() {
const [value, setValue] = useState("");
return (
);
}
```
### Bind to an input
```tsx
"use client";
import { useRef, useState } from "react";
import { Keyboard } from "@axcore/lipikeys";
export function Bound() {
const ref = useRef(null);
const [text, setText] = useState("");
return (
<>