Components
Mobile Bottom Sheet
The BottomSheet component exposed with mobile naming.
Installation
$ npx veil-ui@latest add mobile-bottom-sheetUsage
import {
MobileBottomSheet,
MobileBottomSheetContent,
MobileBottomSheetTrigger,
} from "@/components/ui/mobile-bottom-sheet";
<MobileBottomSheet>
<MobileBottomSheetTrigger asChild>
<Button>Add attachment</Button>
</MobileBottomSheetTrigger>
<MobileBottomSheetContent>{sources}</MobileBottomSheetContent>
</MobileBottomSheet>;Examples
Basic
Confirm
API reference
The package exports mobile-bottom-sheet along with its composable parts. It forwards standard attributes to its root element; see the examples above for the component-specific props.
Accessibility
- Touch targets are large enough to tap comfortably and keep visible focus rings for keyboard and switch users.
- Gesture interactions (swipe, pull to refresh) have visible button alternatives so they are not the only way to act.
- Sheets, drawers and dialogs follow the underlying accessible primitives for focus trapping and escape handling.
Vue and plain HTML
This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add mobile-bottom-sheet --framework vue or switch the framework in components.json.
<script setup lang="ts">
import { BottomSheet } from "@/components/ui/bottom-sheet";
const props = defineProps<{
open?: boolean;
defaultOpen?: boolean;
modal?: boolean;
}>();
const emit = defineEmits<{ "update:open": [value: boolean] }>();
</script>
<template>
<BottomSheet
:open="props.open"
:default-open="props.defaultOpen"
:modal="props.modal"
@update:open="emit('update:open', $event)"
>
<slot />
</BottomSheet>
</template>