window.WindowSize
The window's size, for layouts that depend on the space the app has.
Utilização
Read the current viewport
import { Text, window } from 'kuito';
<Text>{`${window.size.value.width} × ${window.size.value.height}`}</Text>;
<Text>{window.orientation.value === 'landscape' ? 'Wide' : 'Tall'}</Text>;
window.insets.value; // { top, left, bottom, right }Declaração do tipo
export type WindowSize = { width: number; height: number };Membros 2
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
width | number | Sim | — |
height | number | Sim | — |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.