Skip to content

virastack/input-mask

Repository files navigation

Vira Stack Mask


ViraStack Input Mask

The lightweight standard for input formatting and state synchronization in React.

  • 🚀 Ultra-lightweight: Less than 5KB minified & zipped.
  • ⚛️ React-First: Seamless integration with React Hook Form.
  • 🛡️ Type-Safe: Built with TypeScript for an excellent developer experience.
  • 🧠 Smart Presets: Built-in masks for credit cards, phones, currency, and more.

Quick Start

npm install @virastack/input-mask
import { useForm } from 'react-hook-form';
import { useViraMask } from '@virastack/input-mask';

function App() {
  const form = useForm();
  
  const { phone } = useViraMask({
    form,
    schema: {
      phone: 'phone'
    }
  });

  return (
    <form>
      <input {...phone} placeholder="(555) 555 55 55" />
    </form>
  );
}

Explore the ViraStack Ecosystem

  • AI Rules – Standardized AI rules for consistent code generation
  • Next.js Boilerplate – Full-featured, scalable Next.js starter kit
  • Input Mask – Lightweight, zero-dependency input masking library
  • Password Toggle – Accessible, headless password visibility component

... and more at virastack.com

License

Licensed under the MIT License.

Maintainer

A project by Ömer Gülçiçek

Follow Ömer Gülçiçek