# TrySound/rifm

Small react hook and component for building formatted and masked inputs

Repository: https://github.com/TrySound/rifm
Canonical: https://ross.abutalabs.com/products/rifm
Homepage: https://trysound.github.io/rifm/
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-08-26T15:16:36+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 67, longevity 100
- inputs: {"age_days": 2981, "days_push": 7, "days_rel": 7, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1309, forks 37 (observed 2026-08-28T04:04:19.516337+00:00)

## What it is
Rifm is a tiny, dependency-free React hook and render-prop component for building formatted and masked text inputs while preserving cursor position. It works with native inputs and custom input components, supporting number, phone, date, and other value formatting.

## Use cases
- format currency or number inputs with thousand separators in react
- mask phone number input as user types
- add date input mask without losing cursor position
- format credit card number input in react
- enforce casing rules in a text input
- build masked inputs for custom design system components

## When to choose
- you need cursor-aware input formatting in React with a tiny footprint
- you want a dependency-free mask solution that works with any input component
- you prefer a simple hook or render-prop API over heavyweight form libraries

## When to avoid
- you need type=number or type=date inputs, which Rifm does not support
- you need full form state management and validation, not just input formatting
- you are not using React 16.8 or newer

## Facets
- artifact type: library
- maturity: stable
- function: ui-components, form-handling, frontend-framework
- domain: frontend, web-development, developer-tools
- platform: browser, cross-platform
- tags: react-hook, input-masking, input-formatting, cursor-position, render-prop, typescript, dependency-free, nodejs

## Member repositories
- TrySound/rifm (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:19.516337+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:49:58.205033+00:00, confidence not recorded.
  - readme: https://github.com/TrySound/rifm (fetched 2026-08-28T04:04:19.516337+00:00, sha 4d525f308a0a)
  - homepage: https://trysound.github.io/rifm/ (fetched 2026-08-29T12:08:21.014564+00:00, sha 911b35ffdb34)
  - registry_npm: https://registry.npmjs.org/rifm (fetched 2026-08-29T12:08:21.023512+00:00, sha c0dd6fa5476f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
