# Loading Screen

Customize the loading screen, including the native overlay color shown while the view first loads. **Applies to: All integrations**: the loading screen is shown while any view verifies and downloads resources (and on the custom workout's loading screen).

| Parameter | Type | Default | Applies to | What it does internally |
|-----------|------|---------|------------|-------------------------|
| loadingStickmanColor | string | #00FF0B | All | Color of the animated stickman |
| loadingBackgroundColor | string | Black (dark) / White (light) | All | Loading screen background color |
| loadingTextColor | string | White (dark) / Black (light) | All | Color of the loading text and progress messages |

**Color format:** a bare 6-character hex value (e.g. `"1A1A2E"`) gets a `#` added; `#RRGGBB` and CSS color names also work. Avoid 3-character shorthand hex (`"fff"`) without `#`: it is passed through as-is and is not valid CSS.

**SDK Support:**
- **Swift, Kotlin, Flutter:** the `IStyle` object of the create call
- **React Native, React:** the `style` object in `data`
- **HTML/JS:** top-level keys of the launch object

**Native Loading Overlay (Swift):** the SDK shows a native overlay on top of the WebView until the page has loaded, so users never see a blank screen.

- The overlay hides when the `kinestex_loaded` message arrives
- Overlay color priority:
  1. `loadingBackgroundColor` if set
  2. white if `style = "light"`
  3. black if `style = "dark"` (default)

**IStyle Properties:**

| Property | Type | Default | Description |
|----------|------|---------|-------------|
| style | String? | "dark" | Base theme style ("dark" or "light") |
| themeName | String? | null | Theme name ([Theme & Appearance](/docs/customization-parameters/theme-appearance)) |
| loadingStickmanColor | String? | null | Color of the loading stickman |
| loadingBackgroundColor | String? | null | Background color while loading |
| loadingTextColor | String? | null | Text color while loading |

**Loading Screen Customization**

_Swift (iOS)_
```swift
kinestex.createWorkoutView(
    workout: "Fitness Lite",
    user: nil,
    style: IStyle(
        style: "dark",
        loadingStickmanColor: "#FF6B00",
        loadingBackgroundColor: "#1A1A2E",
        loadingTextColor: "#FFFFFF"
    ),
    isLoading: $isLoading,
    onMessageReceived: { message in /* ... */ }
)
```

_Kotlin (Android)_
```kotlin
KinesteXSDK.createWorkoutView(
    context = this,
    workoutName = "Fitness Lite",
    style = IStyle(
        style = "dark",
        loadingStickmanColor = "FF6B00", // hex without #
        loadingBackgroundColor = "1A1A2E",
        loadingTextColor = "FFFFFF"
    ),
    isLoading = viewModel.isLoading,
    onMessageReceived = { message -> handleWebViewMessage(message) },
    permissionHandler = this
)
```

_React Native_
```jsx
const postData: IPostData = {
  key: 'YOUR_API_KEY',
  userId: 'user-123',
  company: 'YOUR_COMPANY',
  style: {
    style: 'dark',
    loadingStickmanColor: 'FF6B00', // hex without #
    loadingBackgroundColor: '1A1A2E',
    loadingTextColor: 'FFFFFF',
  },
};
```

_Flutter_
```dart
KinesteXAIFramework.createWorkoutView(
  workoutName: "Fitness Lite",
  style: IStyle(
    style: 'dark',
    loadingStickmanColor: 'FF6B00', // hex without #
    loadingBackgroundColor: '1A1A2E',
    loadingTextColor: 'FFFFFF',
  ),
  isShowKinestex: showKinesteX,
  isLoading: isLoading,
  onMessageReceived: handleMessage,
);
```

_HTML / JavaScript_
```html
const postData = {
  userId: "user-123",
  company: "YOUR_COMPANY",
  key: "YOUR_API_KEY",
  loadingStickmanColor: "#FF6B00",
  loadingBackgroundColor: "#1A1A2E",
  loadingTextColor: "#FFFFFF",
};
```

_React (TypeScript)_
```tsx
const postData: IPostData = {
  key: 'YOUR_API_KEY',
  userId: 'user-123',
  company: 'YOUR_COMPANY',
  style: {
    style: 'dark',
    loadingStickmanColor: 'FF6B00', // hex without #
    loadingBackgroundColor: '1A1A2E',
    loadingTextColor: 'FFFFFF',
  },
};
```

---
Source: https://www.kinestex.com/docs/customization-parameters/loading-screen · Index: https://www.kinestex.com/llms.txt
