Skip to content

setAppearance()

Function@tryyoursize/react-native

Live restyle (e.g. your dark mode); an open window updates at once.

function setAppearance(appearance: Appearance): void
appearanceAppearanceRequired
Properties
theme"inherit" | "tryyoursize"Optional

"inherit" (default): your app's own colours and font. "tryyoursize": the light beige brand.

variables{ /** Hex: "#rrggbb" or "#rrggbbaa". */ colorPrimary?: string; colorBackground?: string; colorText?: string; /** A CSS font-family for the window. */ fontFamily?: string; /** Corner radius, 0–32. */ borderRadius?: number; }Optional
fonts{ cssSrc: string }[]Optional

Google Fonts stylesheets for the window.

setAppearance({ variables: { colorPrimary: "#3b2f26" } });

Was this page helpful?