Back to Components
Inputs

Masked Input

Input with format masks for phone, credit card, and date with visual placeholders.

Dependencies

  • clsx
  • tailwind-merge

Files

  • components/ui/masked-input.tsx

Installation

Using shadcn CLI

npx shadcn add masked-input --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge