Input

Implement the input component with the following variants:

Basic Input

With Label

Error State

This field is required

Disabled

Input Types

Various States

Input Component
tsx
1import { InputHTMLAttributes, forwardRef } from "react";
2import { cn } from "@/lib/cn";
3
4interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
5 label?: string;
6 error?: string;
7}
8
9const Input = forwardRef<HTMLInputElement, InputProps>(
10 ({ className, label, error, ...props }, ref) => {