suiss/ui · Component
Screen
A full-screen container that pads for safe area insets and sets the status bar style.
Screen is an open-source component from suiss/ui for React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.

Screen is a View that fills the screen, paints the bg-background color (or bg-muted for the secondary variant) and adds padding for the safe area insets on the edges you choose. It also renders a StatusBar with light or dark content to match the color scheme.
ScreenContent lays out the body with padding and gaps. With scrollable, it renders a KeyboardScrollView so content scrolls and stays above the keyboard.
Installation
The CLI also adds what it builds on: Keyboard Scroll View.
- Install the following dependencies:
-
Add the pieces it builds on: Keyboard Scroll View.
-
Copy and paste the following code into
components/ui/screen.tsx:
- Update the import paths to match your project setup.
- Install the following dependencies:
-
Add the pieces it builds on: Keyboard Scroll View.
-
Copy and paste the following code into
components/ui/screen.tsx:
- Update the import paths to match your project setup.
- Install the following dependencies:
-
Add the pieces it builds on: Keyboard Scroll View.
-
Copy and paste the following code into
components/ui/screen.tsx:
- Update the import paths to match your project setup.
-
Target iOS 17 or later.
-
Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Apply the Compose compiler plugin, enable Compose, set
compileSdkto 37 or higher andminSdkto 24 or higher, and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
This code uses Tailwind classes that need Uniwind or NativeWind. With StyleSheet, pass the same values through the style props.
Examples
Secondary
A screen with the secondary background, for grouped screens such as settings.

Scrollable
A screen whose content scrolls, for content taller than the screen or for forms.

This code uses Tailwind classes that need Uniwind or NativeWind. With StyleSheet, pass the same values through the style props.
Top edge only
A screen that pads only the top inset, for when a tab bar or bottom bar handles the bottom inset.

With bottom bar
A scrollable form with a bottom bar holding the main action.

API Reference
Screen
The root view that pads for safe area insets.
| Prop | Type | Default |
|---|---|---|
edges | readonly ScreenEdge[] | ALL_EDGES |
variant | "default" | "secondary" | "default" |
Also accepts the props of ViewProps.
edges lists the sides that get safe area padding: any of top, right, bottom and left, all four by default. The status bar uses light-content in dark mode and dark-content in light mode, following the system appearance. The app must be wrapped in a SafeAreaProvider from react-native-safe-area-context. ScreenContext exposes the active edges to children.
ScreenContent
The padded body, optionally scrollable.
| Prop | Type | Default |
|---|---|---|
scrollable | boolean | false |
Also accepts the props of ViewProps.
scrollable renders a KeyboardScrollView instead of a View, so it needs the Keyboard Scroll View component.
Screen
The root view that pads for safe area insets.
| Parameter | Type | Default |
|---|---|---|
edges | Edge.Set | .all |
background | Background: .background | .muted | .background |
content | () -> Content | - |
ScreenContent
The padded body, optionally scrollable.
| Parameter | Type | Default |
|---|---|---|
scroll | Bool | true |
padded | Bool | true |
content | () -> Content | - |
ScreenEdge
Values: Top, Bottom, Left, Right.
ScreenVariant
Values: Default, Secondary.
Screen
The root view that pads for safe area insets.
| Parameter | Type | Default |
|---|---|---|
modifier | Modifier | Modifier |
edges | Set<ScreenEdge> | AllScreenEdges |
variant | ScreenVariant: Default | Secondary | ScreenVariant.Default |
content | @Composable BoxScope.() -> Unit | - |
ScreenContent
The padded body, optionally scrollable.
| Parameter | Type | Default |
|---|---|---|
modifier | Modifier | Modifier |
scrollable | Boolean | false |
contentPadding | PaddingValues | PaddingValues(16.dp) |
verticalArrangement | Arrangement.Vertical | Arrangement.spacedBy(16.dp) |
content | @Composable ColumnScope.() -> Unit | - |




