AppearancePreferences
The user's display preferences together, for tests and code that need both at once.
Usage
Read the system display preferences.
// Read the system display preferences.
import { Text, appearance, type AppearancePreferences } from 'kuito';
function describe(preferences: AppearancePreferences): string {
const scheme = preferences.colorScheme ?? 'no preference';
return `${scheme}, text at ${Math.round(preferences.fontScale * 100)}%`;
}
<Text>
{describe({ colorScheme: appearance.colorScheme.value, fontScale: appearance.fontScale.value })}
</Text>;Type declaration
export type AppearancePreferences = {
colorScheme: ColorSchemeName | null;
fontScale: number;
};Members 2
| Name | Type | Required | Description |
|---|---|---|---|
colorScheme | Scheme | Yes | — |
fontScale | number | Yes | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.