SafeArea 安全区
Layout · Display component
Device safe-area adaptation.
On-demand import
wbbb-ui/components/safe-areaBasic Usage
<script setup lang="ts">
import { WbbbSafeArea } from 'wbbb-ui/components/safe-area'
import 'wbbb-ui/styles/safe-area'
</script>
<template>
<WbbbSafeArea />
</template>States and Interaction
All listed states can be operated and verified in the live Playground preview.
DefaultContent
API Reference
Props
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
bottom | Enables the bottom safe-area inset. | boolean | true | No |
top | Enables the top safe-area inset. | boolean | false | No |
Events
None
Slots
default
Two-way binding
Does not support v-model.
Platform Notes
Build verification: H5, App Vue, WeChat Mini Program, Alipay Mini Program, and Douyin Mini Program.
Runtime differences: H5 supports keyboard focus and reduced motion. Mini Programs provide equivalent touch interaction; verify upload, date selection, and overlays on target platforms.
Usage note: Use Playground to verify further state combinations and cross-platform behavior.
