React Native · Mobile UI at native speed

How does styling work in React Native?

EasystylingstylesheetlayoutUpdated Oct 2026
Quiz this track

Short answer

Styles are JavaScript objects applied through the style prop. StyleSheet.create creates registered style objects, and arrays compose styles with later entries overriding earlier ones.

React Native does not use CSS files or selectors. Every component accepts a style prop, which can be an object, an array of objects, or a registered style. Property names are camelCase and values are numbers or strings, with numbers interpreted as density-independent pixels unless a percentage string is used.

tsx
import { StyleSheet, Text, View } from "react-native";

const styles = StyleSheet.create({
  card: { padding: 16, borderRadius: 12, backgroundColor: "#fff" },
  title: { fontSize: 18, fontWeight: "700" },
  muted: { color: "#6b7280" },
});

export function Card({ title, subtitle }: { title: string; subtitle: string }) {
  return (
    <View style={styles.card}>
      <Text style={styles.title}>{title}</Text>
      <Text style={[styles.title, styles.muted]}>{subtitle}</Text>
    </View>
  );
}
Later entries in a style array win, so a base style can be overridden locally.

What is different from CSS

  • No cascading or inheritance except for text styles inside a Text tree
  • No pseudo-classes; use component state such as pressed or focused
  • No media queries; use useWindowDimensions and conditional styles
  • Shadows differ: iOS uses shadowColor and shadowOffset, Android uses elevation
  • Transform arrays are objects, such as { translateX: 10 }

Keep styles close to the component or in a shared theme module. A design system with spacing, colour and typography tokens prevents the drift that happens when every screen hard-codes values.

Inline objects are recreated on every render and can cause unnecessary work in memoised components. Prefer StyleSheet.create or a stable value outside the render path.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1Does React Native support CSS?
  2. 2How do you handle responsive styles?
  3. 3What is the difference between shadow and elevation?
  4. 4Why prefer StyleSheet.create over inline objects?

Say it in the interview

Styling in React Native is JavaScript objects passed to the style prop, usually created with StyleSheet.create. Arrays compose styles and the last one wins, and there is no cascade or CSS selector system. I use a small set of design tokens, handle responsiveness with useWindowDimensions, and keep style objects stable so memoised components do not re-render for avoidable reasons.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live React Native mock interview and get scored feedback on depth, clarity and confidence.