Component organization
Atoms
Atomic components are the smallest reusable UI elements.NimazCard
Card component with multiple style variants:presentation/components/atoms/NimazCard.kt
GradientCard
Card with gradient background:presentation/components/atoms/NimazCard.kt
NimazBanner
Informational banner with variants:presentation/components/atoms/NimazBanner.kt
ArabicText
Specialized component for rendering Arabic text with proper styling:Molecules
Molecules combine atoms into more complex components.NimazSettingsItem
Standard settings row with multiple variants:presentation/components/molecules/NimazSettingsItem.kt
NimazMenuItem
Menu item for navigation:NimazEmptyState
Empty state placeholder:Organisms
Organisms are complex, feature-specific components.NimazTopAppBar
Standard top app bar:presentation/components/organisms/TopAppBar.kt
NimazBackTopAppBar
Top app bar with back navigation:presentation/components/organisms/TopAppBar.kt
Prayer-specific components
Prayer colors
Each prayer time has dedicated colors:PrayerCard
Gradient card for prayer times:Design tokens
Components use design tokens for consistency:presentation/theme/Shape.kt
Component guidelines
- Prefer composition over inheritance: Build complex components from simpler ones
- Use Material 3 components: Extend Material 3 components when possible
- Include previews: Every component should have preview functions
- Support theming: Use theme colors and typography
- Modifiers first: Accept
modifieras the first optional parameter
Related
- Compose screens - Screen organization
- Theming - Theme system
- Navigation - Navigation patterns