ui-currency-input

Implements a Romanian-format currency input component for React ERP forms.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/Aurelian1974/ERPEnterprise --skill ui-currency-input-aurelian1974
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ui-currency-input
Source: https://github.com/Aurelian1974/ERPEnterprise/tree/main/.github/skills/ui-currency-input
Command: npx skills add https://github.com/Aurelian1974/ERPEnterprise --skill ui-currency-input-aurelian1974

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires react, react-hook-form, zod.

What problem does it solve? ERP forms need monetary inputs that display values in the Romanian locale format (1.234,56 RON) while keeping the internal value as a number, which standard text inputs cannot handle correctly. ## Core Features & Use Cases - CurrencyInput Component: A controlled React input that formats values with dot thousand separators and comma decimal separators, parses permissive user input, and applies min/max clamping and decimal rounding. - React Hook Form + Zod Integration: Connects the input to form schemas where the internal value is always a number, never a string. - CurrencyDisplay & useCurrencyFormat: Read-only display component and formatting hook for tables and detail views using Intl.NumberFormat with the ro-RO locale. - Use Case: When building an invoice line-item grid, use CurrencyInput with align="right" and font-mono so price columns align vertically and users can overwrite values directly on focus. ## Quick Start Ask the AI to add a Romanian-format currency input field for unit price to your React Hook Form ERP form using the CurrencyInput component.

Frequently Asked Questions about ui-currency-input

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a currency input in React with Romanian number format?▼

Use a controlled input that formats the number with Intl.NumberFormat and the ro-RO locale when not focused, and switches to a raw editable string on focus. On blur, parse the input by removing dot thousand separators and converting the comma decimal separator before calling parseFloat.

How to integrate a currency input with React Hook Form and Zod?▼

Define the field as z.number() in the Zod schema and wire the component through the field value and onChange props. The component emits number or null, so the form state stays numeric and validation rules like positive() or min() apply directly.

Should currency values be stored as number or string in forms?▼

Store currency values as number in both form state and the database, never as formatted strings. Formatting with thousand and decimal separators should happen only at display time, keeping calculations and validation reliable.

Does Intl.NumberFormat support Romanian locale formatting?▼

Yes, Intl.NumberFormat with the ro-RO locale produces the 1.234,56 format with dot thousand separators and comma decimals natively. It also supports compact notation for abbreviated large values.

Why does my currency input lose formatting while the user types?▼

Formatting on every keystroke breaks cursor position and editing. Keep a raw string state while focused and only apply locale formatting on blur, which is the standard ERP editing pattern.