Skip to main content
New in React Native SDK 2.6.0, which needs the 2.6.0 native SDKs.
The native SDKs draw the reward sheet. From 2.6.0 the sheet takes its colors, corners, borders, images, and motion from the Style editor in the publisher portal (when the editor is on for your app) and from the variant, with no code. Your code gives it fonts. The per-component components map of the native SDKs is not in the React Native SDK.

Give the sheet your fonts

Reference: placement().appearance().
appearance() takes an AppearanceConfig: the brand colors, as the native placement takes them, and sheet. Fields of the wrong type are dropped, and the last call wins. With no heading marks in the sheet’s style, the heading font draws nothing. Each name must be a font your native app already registers:
  • iOS: a font listed under UIAppFonts in Info.plist. Pass a name UIFont(name:) loads, such as its PostScript name.
  • Android: a font resource in res/font (luckiestguy_regular, or the name in that form), or a file in assets/fonts named <name>.ttf or <name>.otf, where React Native’s linked fonts go. A font loaded only at run time, for example with expo-font’s useFonts, is not found on Android.
The Android bridge looks up a res/font resource by name at run time, so release resource shrinking can remove a font that nothing else references. Keep them with android/app/src/main/res/raw/keep.xml:
A blank name, a name the platform cannot load, or a font that fails to load (for example a downloadable font that was never cached, with the device offline) draws the system font. Only a sheet you present with Encore.placement(id).appearance(...) takes sheet. A trigger component’s appearance styles the trigger, and the sheet it opens does not take sheet, as in the native SDKs.

Styles from the Style editor and motion

Colors, corners, borders, images, and motion that the Style editor sets reach the sheet with no code. A Lottie animation plays only when your app links Lottie (lottie-ios 4.x on iOS, com.airbnb.android:lottie 5.2 or later on Android). Without it, the element draws as it did before 2.6.0.