Files
blackroad-os-web/components/ui/Input.tsx
Alexa Louise a4bfd5269b feat: Major UI enhancement with BlackRoad brand system
- Add stunning landing page with hero, features, and CTA sections
- Update login/signup pages with dark theme and brand gradients
- Enhance Sidebar with improved navigation and brand colors
- Update AppHeader with search bar, notifications, and user menu
- Add reusable UI components (Button, Card, Input, Badge)
- Add API health and status endpoints
- Apply official BlackRoad brand colors (#FF1D6C hot pink, #F5A623 amber, #2979FF electric blue, #9C27B0 violet)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-11 14:37:43 -06:00

53 lines
1.5 KiB
TypeScript

import { forwardRef, InputHTMLAttributes } from 'react';
import { cn } from '@/lib/cn';
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
label?: string;
error?: string;
icon?: React.ReactNode;
}
const Input = forwardRef<HTMLInputElement, InputProps>(
({ className, label, error, icon, id, ...props }, ref) => {
return (
<div className="w-full">
{label && (
<label
htmlFor={id}
className="block text-sm font-medium text-gray-300 mb-2"
>
{label}
</label>
)}
<div className="relative">
{icon && (
<div className="absolute left-4 top-1/2 -translate-y-1/2 text-gray-500">
{icon}
</div>
)}
<input
ref={ref}
id={id}
className={cn(
'w-full bg-white/5 border border-white/10 rounded-xl text-white placeholder-gray-500',
'focus:outline-none focus:ring-2 focus:ring-[#FF1D6C]/50 focus:border-transparent',
'transition-all duration-200',
icon ? 'pl-11 pr-4 py-3' : 'px-4 py-3',
error && 'border-red-500/50 focus:ring-red-500/50',
className
)}
{...props}
/>
</div>
{error && (
<p className="mt-2 text-sm text-red-400">{error}</p>
)}
</div>
);
}
);
Input.displayName = 'Input';
export default Input;