Form Input
A comprehensive collection of reusable UI components built with modern best practices. All components are designed to be accessible, customizable, and performant.
Overview
Our component library provides battle-tested solutions for common UI patterns. Each component follows consistent design principles and includes proper TypeScript support, accessibility features, and comprehensive documentation.
Component Categories
Form Components
Essential form elements for building user interfaces and data collection.
- FormInput - Flexible input component with validation states
- FormDatePicker - Date picker with calendar interface
- Combobox - Searchable dropdown with multi-select support
- FormSelect - Traditional select with enhanced styling
- FormCheckbox - Checkbox with proper labeling
- FormRadio - Radio button group component
- FormTextarea - Textarea with auto-resize features
Layout Components
Structural components for organizing and displaying content.
- Card - Versatile container for content display
- Container - Responsive layout wrapper
- Grid - Flexible grid system
- Stack - Vertical and horizontal stacking
Feedback Components
Components for user feedback and notifications.
- Alert - Important message display
- Toast - Temporary notification messages
- Progress - Progress indicators
- Spinner - Loading states
Navigation Components
Interactive elements for user navigation and actions.
- Button - Versatile button with multiple variants
- Link - Styled link component
- Breadcrumb - Navigation breadcrumbs
- Pagination - Page navigation
Data Display Components
Components for presenting and organizing data.
- Table - Data table with sorting and filtering
- List - Ordered and unordered lists
- Badge - Status and count indicators
- Avatar - User profile images
Design Principles
All components follow these core principles:
- Accessibility First - Built with ARIA attributes and keyboard navigation
- Consistent Design - Unified visual language and interaction patterns
- Flexible & Customizable - Easy to adapt to different design systems
- Performance Optimized - Lightweight and efficient rendering
- TypeScript Ready - Full type safety and IntelliSense support
Getting Started
Installation
npm install @codecng/components
Basic Usage
import { FormInput, Button, Card } from '@codecng/components'
function MyForm() {
return (
<Card>
<FormInput label="Name" required />
<FormInput label="Email" type="email" required />
<Button variant="primary">Submit</Button>
</Card>
)
}
Quick Setup
- Install the package - Add to your project dependencies
- Import components - Use named imports for the components you need
- Start building - Combine components to create your interfaces
Customization
Components can be customized through:
- CSS Custom Properties - Theme variables for colors, spacing, and typography
- Design Tokens - Consistent values for design system elements
- Component Props - Built-in customization options
- CSS Modules - Component-specific styling
Browser Support
- Modern Browsers - Chrome, Firefox, Safari, Edge (latest 2 versions)
- Mobile Browsers - iOS Safari, Chrome Mobile
- Accessibility - Screen readers, keyboard navigation, high contrast
Contributing
We welcome contributions! Please see our Contributing Guide for:
- Component development guidelines
- Design system principles
- Testing requirements
- Documentation standards
Resources
- Design System - Visual guidelines and tokens
- Theming Guide - Customization and theming
- Accessibility Guide - A11y best practices
- Migration Guide - Upgrading between versions