Input Patterns
Guidelines and components for building form interfaces.
Text Inputs
import { Input, Label } from '@gtcx/ui';
// Basic input with label
<div>
<Label htmlFor="name">Full Name</Label>
<Input id="name" placeholder="Enter your name" />
</div>
// With prefix/suffix
<Input prefix={<SearchIcon />} placeholder="Search..." />
<Input suffix=".com" placeholder="yoursite" />
// Disabled and read-only
<Input disabled value="Cannot edit" />
<Input readOnly value="Read-only value" />Input Sizes
<Input size="sm" placeholder="Small" />
<Input size="md" placeholder="Medium (default)" />
<Input size="lg" placeholder="Large" />Select
import { Select } from '@gtcx/ui';
<Select
placeholder="Choose a country"
options={[
{ value: 'ng', label: 'Nigeria' },
{ value: 'ke', label: 'Kenya' },
{ value: 'gh', label: 'Ghana' },
]}
showSearch
/>Textarea
import { Textarea } from '@gtcx/ui';
<Textarea
placeholder="Enter description..."
rows={4}
maxLength={500}
showCount
/>Date Inputs
import { DatePicker, Calendar } from '@gtcx/ui';
<DatePicker placeholder="Select date" format="DD/MM/YYYY" />
<DatePicker.RangePicker />Guidelines
- Always pair inputs with visible labels (not just placeholders)
- Use
placeholderfor format hints, not as a label replacement - Group related fields with consistent spacing (16px between fields)
- Prefer dropdown/select for 3+ options over radio buttons
- Use
size="lg"for mobile-first or accessibility contexts