;

rem units

Fluffle supports rem units for scalable and consistent sizing across devices.

Basic usage

Use rem values as strings in supported style properties.

ts
const styles = StyleSheet.create({
  text: {
    fontSize: "1rem",
  },
  container: {
    padding: "2rem",
  },
});

How it works

1rem is resolved from a root font size and automatically respects the user’s font scaling preferences.

  • Native platforms default to 14
  • Web uses the browser root font size (usually 16px)

Notes

  • Only supported style properties accept rem
  • Values are resolved to numbers at runtime