SafeArea
SafeArea
Section titled “SafeArea”Category: Surfaces & shell
{ /* Add the iOS home-bar inset to the bottom of a fixed bar */}<div style={{ position: 'fixed', insetInlineStart: 0, insetInlineEnd: 0, bottom: 0 }}> <SafeArea edges={['bottom']}> <BottomNav>…</BottomNav> </SafeArea></div>;
{ /* Reserve all four insets on a full-screen page */}<SafeArea edges="all"> <PageContent /></SafeArea>;To opt into safe-area handling, your <meta name="viewport" content="…">
must include viewport-fit=cover.
Install: @helix-ui/core
import { SafeArea } from '@helix-ui/core';status: stable · since: 0.5.0
Tags: mobile, inset, notch, home-indicator
Anatomy
Section titled “Anatomy”╔═════════════════════════════╗ ← top inset (notch / status bar)║ <children> ║║ ║╚═════════════════════════════╝ ← bottom inset (home indicator)Layout
Section titled “Layout”- display —
block - width —
fill - height —
fill - intrinsicSize —
fills viewport; pads chosen edges by env(safe-area-inset-*) - stackable —
false - fullBleed —
true
Visual
Section titled “Visual”A presentational wrapper that reads env(safe-area-inset-top|right|bottom|left) and applies them as padding (default) or margin to the chosen edges.
| Name | Type | Default | Description |
|---|---|---|---|
edges |
SafeAreaEdge[] | 'all' |
all |
Which edges to reserve. `‘top’ |
apply |
'padding' | 'margin' |
padding |
How to apply the inset. |
Accessibility
Section titled “Accessibility”Notes
- SafeArea is presentational. It does not change focus order or alter content semantics.
Composes with
Section titled “Composes with”| Component | Relation | Note |
|---|---|---|
AppShell |
parent |
Wrap AppShell on mobile builds. |
BottomNav |
parent |
Often wraps the BottomNav region. |
FAB |
sibling |
Prompt examples
Section titled “Prompt examples”These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.
pad below the notch
Section titled “pad below the notch”“safe area top + bottom”
<SafeArea edges={['top', 'bottom']}> <App /></SafeArea>