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

AccessoryWidgetBackground

一个 SwiftUI 自适应背景视图,会根据小部件的环境提供标准外观。

iOS
Included in Expo Go
Recommended version:
~57.0.22

Expo UI AccessoryWidgetBackground 与官方 SwiftUI AccessoryWidgetBackground API 一致,并创建一个自适应背景视图,根据小组件的环境提供标准外观。

🌐 Expo UI AccessoryWidgetBackground matches the official SwiftUI AccessoryWidgetBackground API and creates an adaptive background view that provides a standard appearance based on the widget's environment.

安装

🌐 Installation

Terminal
- npx expo install @expo/ui
- yarn expo install @expo/ui
- pnpm expo install @expo/ui
- bun expo install @expo/ui

If you are installing this in an existing React Native app, make sure to install expo in your project.

用法

🌐 Usage

基本访问器小部件背景

🌐 Basic accessory widget background

BasicAccessoryWidgetBackground.tsx
import { AccessoryWidgetBackground, VStack, Text, ZStack, } from '@expo/ui/swift-ui'; export default function BasicAccessoryWidgetBackground() { return ( <ZStack> <AccessoryWidgetBackground /> <VStack> <Text>MON</Text> </VStack> </ZStack> ); }

应用接口

🌐 API

import { AccessoryWidgetBackground } from '@expo/ui/swift-ui';

Component

AccessoryWidgetBackground

iOS

Type: React.Element<AccessoryWidgetBackgroundProps>

AccessoryWidgetBackgroundProps