RIFM

JSON →
library 0.12.1 ·javascript
verified Jun 4, 2026

RIFM (React Input Format & Mask) is a tiny (~800 bytes, gzipped) library that provides both a component and a hook to transform any input component into a formatted or masked input. Current stable version is 0.12.1. It requires React 16.8+, has zero dependencies, and ships with TypeScript definitions. Unlike larger alternatives like react-number-format or react-input-mask, RIFM is minimal and focused on cursor-position preservation after formatting. It supports any input component (e.g., Material-UI, custom) and can handle number formatting, date masking, and case enforcement. Release cadence is low; updates are infrequent but stable.