This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

Expo 路由颜色

一个用于访问特定平台原生颜色的 Expo Router API。

Android
iOS
Recommended version:
~58.0.17

颜色 API 提供对平台特定原生颜色的访问。

🌐 The Color API provides access to platform-specific native colors.

用法

🌐 Usage

import { Color } from 'expo-router'; import { Text, View, useColorScheme } from 'react-native'; export default function MyComponent() { useColorScheme(); return ( <View style={{ flex: 1, backgroundColor: Color.android.dynamic.primary }}> <Text style={{ color: Color.ios.label }}>Hello</Text> </View> ); }

应用接口

🌐 API

import { Color } from 'expo-router';

No API data file found, sorry!