This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Surface
A Jetpack Compose Surface component for styled content containers.
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.


Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic surface
Surface with elevation
Use tonalElevation and shadowElevation to control the visual depth of the surface.
Surface with custom colors
Use the color and contentColor props to override the default Material theme colors.
Surface with shape and border
Use the shape prop to clip content and border to draw a stroke around the surface.
API
import { Surface } from '@expo/ui/jetpack-compose';
Component
Type: React.Element<SurfaceProps>
A Material Design surface container. Surface is responsible for:
- Clipping content to the shape
- Applying background color based on tonal elevation
- Providing content color to its children
booleanWhether the surface is in a checked (toggled on) state. When provided together with
onCheckedChange, the surface becomes a toggleable surface.
ColorValueThe background color of the surface.
Defaults to MaterialTheme.colorScheme.surface.
ColorValueThe color of the content inside the surface.
Defaults to contentColorFor(color).
boolean • Default: trueWhether the surface is enabled and responds to user interaction.
(checked: boolean) => voidCalled when the checked state of a toggleable surface changes.
Providing this callback together with checked enables the toggleable variant.
() => voidCalled when the surface is clicked. Providing this callback makes the surface clickable.
When combined with selected, the surface becomes a selectable variant.
booleanWhether the surface is in a selected state. When provided together with onClick,
the surface becomes a selectable surface that visually reflects its selection state.
number • Default: 0The shadow elevation of the surface. Value in dp.