# Components, Props & Styling

> Break screens into reusable components, pass data down, and style them consistently with themes and design tokens. Free notes, key concepts, resources and a...

Canonical: https://www.internhack.in/roadmaps/tracks/mobile/components-and-styling
Last updated: 2026-11-28

Break screens into reusable components, pass data down, and style them consistently with themes and design tokens.

Beginner · about 6 hours · difficulty 2/5

Learn first: [React Native with Expo](https://www.internhack.in/roadmaps/tracks/mobile/react-native-expo), [Material Design 3 (Android)](https://www.internhack.in/roadmaps/tracks/mobile/material-design)

All four stacks now share the same mental model: **UI is a function of state**. You describe what the screen should look like for the current data, and the framework updates the real views.

### Components

- React Native: function components returning JSX. Flutter: `StatelessWidget`/`StatefulWidget`. Compose: `@Composable` functions. SwiftUI: `View` structs.
- Pass data **down** as props/parameters and events **up** as callbacks (`onPress`, `onTap`, `onClick`).
- Keep components small and focused; a `ProductCard` should not know how to fetch products.

### Styling

- React Native uses JavaScript objects via `StyleSheet.create`, with camelCase properties like `backgroundColor` and unitless density-independent numbers.
- Flutter, Compose and SwiftUI style through widget properties or modifiers (`.padding()`, `Modifier.padding()`).
- Centralise **design tokens**: colours, spacing scale (4, 8, 12, 16...), font sizes and radii. Reference tokens instead of magic numbers.

### Images and fonts

Load local assets and remote images with caching (Expo Image, `cached_network_image`, Coil, AsyncImage). Provide multiple resolutions for local images and load custom fonts before rendering text.

**Good enough to move on:** you built a reusable card component used in three places with different data, styled only with tokens.

## Key concepts

- **Declarative UI: UI as a function of state**
- **Props down, events up**
- **Component composition**
- **Styling APIs per framework**
- **Design tokens and themes**
- **Images and image caching**
- **Custom fonts and icons**

## Mini project

Build a recipe card component (image, title, cook time, tag chips) and render a grid of six different recipes from an array.

## Check yourself

Where should the data a card displays come from, and why should the card not fetch it itself?

## Free resources

- [React Native: Core components](https://reactnative.dev/docs/intro-react-native-components) (React Native)
- [React Native: Style](https://reactnative.dev/docs/style) (React Native)
- [Flutter: Building user interfaces](https://docs.flutter.dev/ui) (Flutter)

Previous: [Human Interface Guidelines (iOS)](https://www.internhack.in/roadmaps/tracks/mobile/human-interface-guidelines) · Next: [Layout Systems: Flexbox, Rows, Columns & Stacks](https://www.internhack.in/roadmaps/tracks/mobile/layout-systems)

## More in Screens, Layouts & Responsive UI

- [Components, Props & Styling](https://www.internhack.in/roadmaps/tracks/mobile/components-and-styling)
- [Layout Systems: Flexbox, Rows, Columns & Stacks](https://www.internhack.in/roadmaps/tracks/mobile/layout-systems)
- [Responsive & Adaptive Screens](https://www.internhack.in/roadmaps/tracks/mobile/responsive-adaptive)
- [Lists, Scrolling & User Input](https://www.internhack.in/roadmaps/tracks/mobile/lists-and-forms)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Mobile App Developer Roadmap](https://www.internhack.in/roadmaps/tracks/mobile)
