This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
表面
用于样式化内容容器的 Jetpack Compose Surface 组件。
Android
Included in Expo Go
Recommended version:
~58.0.15
Expo UI Surface 与官方 Jetpack Compose Surface API 相匹配,并提供一个容器,应用 Material Design 表面样式,包括颜色、层次和内容颜色。
🌐 Expo UI Surface matches the official Jetpack Compose Surface API and provides a container that applies Material Design surface styling including color, elevation, and content color.
import{Host,Surface,Text}from'@expo/ui/jetpack-compose';import{ paddingAll }from'@expo/ui/jetpack-compose/modifiers';exportdefaultfunctionBasicSurfaceExample(){return(<HostmatchContents><Surface><Textmodifiers={[paddingAll(16)]}>
Content on a surface
</Text></Surface></Host>);}
有高程的表面
🌐 Surface with elevation
使用 tonalElevation 和 shadowElevation 来控制表面的视觉深度。
🌐 Use tonalElevation and shadowElevation to control the visual depth of the surface.