window.WidthClass
The window's width class, by its width: under 600, under 840, and wider.
Verwendung
Switch layout at a window width class.
// Switch layout at a window width class.
import { Show, Text, VStack, window, type WidthClass } from 'kuito';
const twoPanes = (width: WidthClass) => width !== 'compact';
<Show when={twoPanes(window.widthClass.value)} fallback={<Text>List</Text>}>
<VStack flexDirection="row">
<Text>List</Text>
<Text>Detail</Text>
</VStack>
</Show>;Typdeklaration
export type WidthClass = 'compact' | 'medium' | 'expanded';Typ
"medium" | "compact" | "expanded"Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.