Styling Stack
The app uses a multi-layered styling approach:HeroUI Native
Pre-built, accessible UI components with consistent design
Uniwind
Tailwind CSS utility classes for React Native
Tailwind CSS 4
Modern CSS framework with custom theming
HeroUI Native Components
HeroUI Native provides accessible, themeable components built for React Native.Installation
Already installed in the project:package.json
Using HeroUI Components
Import components fromheroui-native:
Available Components
- TextField - Input fields with labels and validation
- Button - Buttons with variants and states
- Card - Container components
- Select - Dropdown selectors
- Modal - Dialog components
- And many more…
Custom Input Component
The app provides a wrapped Input component with enhanced functionality:components/ui/input.tsx
Uniwind Setup
Uniwind brings Tailwind CSS utility classes to React Native.Configuration
Uniwind is configured inmetro.config.js:
metro.config.js
TypeScript Types
Uniwind auto-generates TypeScript types inuniwind-types.d.ts:
src/uniwind-types.d.ts
Tailwind CSS Usage
Global Styles
Global styles are defined insrc/global.css:
src/global.css
Using Tailwind Classes
Apply Tailwind classes using theclassName prop:
Responsive Design
Tailwind breakpoints work in React Native:Conditional Classes
Usecn() helper for conditional classes:
Theme Configuration
Theme Constants
Theme colors and fonts are defined insrc/constants/theme.ts:
src/constants/theme.ts
Using Theme Colors
Access theme colors with theuseThemeColor hook:
Theme-Aware Components
The app provides theme-aware wrapper components:components/themed-view.tsx
Styling Patterns
1. Component Styling
Combine HeroUI components with Tailwind classes:2. Status Badges
Dynamic styling based on status:utils/style.ts
3. Form Styling
Consistent form field styling:4. Custom Theme Colors
Access custom theme colors fromglobal.css:
5. Dark Mode
Automatically handle dark mode withdark: prefix:
Platform-Specific Styles
Using Platform Select
Platform-Specific Files
Create platform-specific implementations:Best Practices
1. Prefer Tailwind Classes
2. Use Theme Colors
3. Componentize Styles
4. Use the cn() Helper
Next Steps
- Project Structure - Learn about the codebase organization
- Configuration - Configure app settings
- Environment Setup - Set up your development environment