WidthClass
The window's width class, by its width: under 600, under 840, and wider.
Utilisation
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>;Déclaration du type
export type WidthClass = 'compact' | 'medium' | 'expanded';Type
"medium" | "compact" | "expanded"Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.