1.0.0 â€ĸ Published 4 months ago

@cognam/custom-input v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

đŸ“Ļ Custom Input Component

A reusable and customizable Material-UI Input component with enhanced features like:

  • ✅ Input masking
  • đŸšĢ Custom error handling
  • â„šī¸ Helper text
  • đŸŽ¯ Start/end adornments
  • đŸŽ›ī¸ Fully compatible with Material-UI TextField props

🚀 Installation

npm install @cognam/custom-input

🧩 Usage

import React from 'react';
import CustomInput from '@cognam/custom-input';

function MyForm() {
  return (
    <CustomInput
      label="Phone Number"
      mask="(999) 999-9999"
      error={false}
      helperText="Enter your phone number"
    />
  );
}

📘 Props

PropTypeDefaultDescription
testIdstring—Required. Used for testing libraries
labelstring or object—Label for the input
maskstring—Input mask pattern (e.g., 999-999-9999)
errorbooleanfalseError state toggle
errorTextstring—Error message shown below the input
...propsany—All other valid Material-UI TextField props