# isCompactViewport

Whether a viewport is a phone's, in either orientation: narrower than
[`PANEL_MIN_WIDTH`](https://docs.mapcairn.com/api/core/PANEL_MIN_WIDTH.md) (the bottom sheet) or shorter than
[`PANEL_MAX_HEIGHT_EXCLUSIVE`](https://docs.mapcairn.com/api/core/PANEL_MAX_HEIGHT_EXCLUSIVE.md) (a phone on its side, which gets the side
panel). A short desktop window counts too. The map key starts minimised
here, because the screen is small.

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { isCompactViewport } from "@mapcairn/core";
 
function isCompactViewport(viewport: {
    width: number;
    height: number;
}): boolean;
```

## Parameters

- `viewport` (`{
    width: number;
    height: number;
}`)

## Returns

`boolean`

Source: [packages/core/src/layout/layout.ts:35](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layout/layout.ts#L35)
