> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# LynxSystemInfo

Device and platform facts, such as the screen size and the operating system. `import { LynxSystemInfo } from '@blotch/angular-lynx';`

## Usage

```typescript title="src/app/device.ts"
import { Component, inject } from '@angular/core';
import { LYNX_ELEMENTS, LynxSystemInfo } from '@blotch/angular-lynx';

@Component({
  selector: 'app-device',
  imports: [LYNX_ELEMENTS],
  template: `
    <text>{{ info.platform }} {{ info.osVersion }}</text>
    <text>{{ info.screenWidth }} × {{ info.screenHeight }}</text>
  `,
})
export class Device {
  readonly info = inject(LynxSystemInfo);
}
```

## API

### `LynxSystemInfo`

```typescript
@Injectable({ providedIn: 'root' })
class LynxSystemInfo {}
```

Reads Lynx's global `SystemInfo`. Lynx fills it in once when the page starts, so the values never change and aren't signals. `osVersion` is the exception, below.

- **Creating it throws** outside Lynx, such as in unit tests.

### `LynxSystemInfo.platform`

```typescript
get platform(): PlatformType;
```

The platform, such as `'iOS'`, `'Android'` or `'web'`. See [`PlatformType`](#platformtype) for every value.

### `LynxSystemInfo.osVersion`

```typescript
get osVersion(): string;
```

The operating system's version, such as `'26.1'` on iOS or `'15'` on Android. Empty while it isn't known.

- **On iOS and Android, Lynx leaves it out of the SystemInfo your components see,** so it comes from elsewhere. The apps `ng build --platform` makes send it as the `osVersion` [global prop](/guide/embedding/host-data.md#what-the-generated-apps-pass). Your own native app can send it the same way.
- **Without the global prop,** it's asked of the [background thread](/guide/glossary.md#background-thread), which has it, and arrives shortly after the first frame. Reading it in a `computed()` picks the answer up.

### `LynxSystemInfo.engineVersion`

```typescript
get engineVersion(): string;
```

The Lynx engine's version, such as `'3.2'`.

### `LynxSystemInfo.pixelWidth` and `pixelHeight`

```typescript
get pixelWidth(): number;
get pixelHeight(): number;
```

The screen's size in physical pixels.

### `LynxSystemInfo.pixelRatio`

```typescript
get pixelRatio(): number;
```

Physical pixels per CSS pixel.

### `LynxSystemInfo.screenWidth` and `screenHeight`

```typescript
get screenWidth(): number;
get screenHeight(): number;
```

The screen's size in CSS pixels: the physical size divided by `pixelRatio`.

- **It's the size when the page started.** It doesn't follow a phone folding or unfolding, a rotation or split screen. For a size that does, as signals, use [`LynxViewport`](/api/angular-lynx/device/viewport.md).

### `LynxSystemInfo.runtimeType`

```typescript
get runtimeType(): 'v8' | 'jsc' | 'quickjs';
```

The JavaScript engine that runs the [background thread](/guide/glossary.md#background-thread). Lynx sets it only on that thread.

### `LynxSystemInfo.theme`

```typescript
get theme(): object | undefined;
```

A theme object, if the [host app](/guide/glossary.md#host-app) provides one. For light or dark mode, use [`LynxTheme`](/api/angular-lynx/device/theme.md).

## Types

### `PlatformType`

```typescript
import type { PlatformType } from '@blotch/angular-lynx';

type PlatformType = 'Android' | 'iOS' | 'Harmony' | 'windows' | 'macOS' | 'web';
```

The platform, spelled exactly as Lynx reports it. Compare with the strings as written: `'iOS'` matches, `'ios'` never does.

- **The casing is Lynx's.** Each platform names itself, so `'windows'` is lower case and `'macOS'` isn't.
- **`'web'`** is the [web preview](/guide/glossary.md#web-preview). `@lynx-js/types`' own `PlatformType` leaves it out.
- **`'pc'` isn't a value.** `@lynx-js/types` still lists it: desktop Lynx reported it before Lynx 3.3, and no supported version does.

## Related

- [Safe area](/api/angular-lynx/device/safe-area.md)
- [Viewport](/api/angular-lynx/device/viewport.md)
- [Theme](/api/angular-lynx/device/theme.md)
- [The JavaScript environment](/guide/concepts/javascript-environment.md)
