SafeArea
Applies CSS env() safe-area insets so content stays clear of device notches, home indicators, and rounded display corners.
Installation
dotnet add package Lumeo
One-time app setup (AddLumeo(), CSS & JS) is covered in the
installation guide.
Usage
@using Lumeo <SafeArea />
Desktop / Android note
When to Use
- Wrapping full-screen layouts on iPhones with notches or dynamic islands to avoid clipped content
- Fixing bottom navigation bars and action sheets that overlap the home indicator on notched devices
- PWAs and hybrid apps running in standalone mode where the OS chrome is absent
- Modals, drawers, and sheets that extend edge to edge and need inset compensation
- Any layout where
viewport-fit=coveris set in the meta tag
Safe content
Padded away from top and bottom insets via env(safe-area-inset-top/bottom)
Full safe area
Padding applied on all four edges — useful for full-screen overlays
List item 9
List item 9
List item 9
List item 9
List item 9
List item 9
List item 9
List item 9
On iPhone, SafeArea pushes the bar above the home indicator. On desktop it has no visual effect — the bar just sits at the bottom as normal.
API Reference
SafeArea
| Property | Type | Default | Description |
|---|---|---|---|
| ChildContent | RenderFragment? | — | Content to wrap with safe-area padding. |
| Top | bool | true | Apply padding-top: env(safe-area-inset-top). |
| Bottom | bool | true | Apply padding-bottom: env(safe-area-inset-bottom). |
| Left | bool | false | Apply padding-left: env(safe-area-inset-left). |
| Right | bool | false | Apply padding-right: env(safe-area-inset-right). |
| Class | string? | null | Additional CSS classes applied to the wrapper element. |
Related Components
- PullToRefresh — Gesture-driven data reload typically used inside a safe-area layout
- Sheet — Bottom sheet overlay that benefits from bottom safe-area insets
- Drawer — Side drawer that may require left/right safe-area on landscape phones