# setAppearance()

> Live restyle (e.g.

Source: https://docs.tryyoursize.com/reference/react-native/set-appearance/

*Function* · `@tryyoursize/react-native`

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

```ts
function setAppearance(appearance: Appearance): void
```

## Parameters

- **`appearance`** (`Appearance`, required)
  - **`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.

## Example

**React Native**

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

**Swift**

```swift
tys.appearance.colorPrimary = TYSColor(hex: "#3b2f26") // an open window restyles at once
```

**Kotlin**

```kotlin
tys.appearance = tys.appearance.copy(colorPrimary = 0xFF3B2F26.toInt())
```

**Flutter**

```dart
await tys.setAppearance(const Appearance(colorPrimary: Color(0xFF3B2F26)));
```
