Getting Started
Quick start guide to building your first UI component following our standardized architecture
Getting Started with UI Development
Overview
This guide will help you build your first UI component in our React Native application within 15 minutes. You'll create a working component that follows our UI Architecture Overview and all established standards.
Time to First Component: ~15 minutes
By the end of this guide, you'll have:
- Created a foundation component
- Applied design tokens
- Added TypeScript types
- Written basic tests
- Integrated it into a feature
Prerequisites
Before starting, ensure you have:
- Development environment set up (see development-setup)
- Basic knowledge of React Native and TypeScript
- Access to the project repository
Your First Component: IconButton
We'll create an IconButton component - a button that displays an icon with optional text. This example demonstrates all key concepts of our UI architecture.
Determine Component Category
First, decide where your component belongs using our decision tree:
Since IconButton is a reusable UI element with no business logic, it belongs in the foundation layer.
Component Checklist
Before considering your component complete, verify:
- Correct folder placement (
ui/foundation/,ui/patterns/, orui/business/) - TypeScript interfaces with proper documentation
- Design tokens only - no hardcoded colors, spacing, or sizes
- Accessibility support with proper roles and labels
- Basic tests covering main functionality
- Barrel exports in index.ts
- No business logic in foundation/pattern components
Common Patterns
Using Design Tokens
Always use design tokens for visual properties:
Component Composition
Build complex components from simpler ones:
For more Button component examples including all variants, states, and testing patterns, see the Button Component.
Next Steps
Now that you've created your first component:
- Explore existing components in
ui/foundation/for examples - Read the UI Architecture Standards for detailed guidelines
- Study component-patterns for advanced techniques
- Learn about Theme Management for customization
Troubleshooting
Common Issues
Import errors: Ensure you're using the correct import paths:
@/ui/foundation/...for foundation components@/core/shared/...for utilities and tokens@/core/domains/...for business logic
TypeScript errors: Check that all props are properly typed and exported
Style issues: Verify you're using design tokens, not hardcoded values
Quick Reference
File Structure
Import Order
Design Token Usage
Congratulations! 🎉 You've successfully created your first component following our UI architecture. Continue exploring the documentation to master advanced patterns and best practices.
UI Development
Comprehensive guide to UI development, component architecture, and design system implementation for React Native applications.
UI Architecture Overview
Comprehensive guide to UI folder organization, component hierarchy, and integration with the core architecture for consistent frontend development.