Skip to content

BottomSheet

A material design bottom sheet.

Usage

vue
<template>
  <Column>
    <Button @click="showBottomSheet">Show BottomSheet</Button>

    <BottomSheet v-model:visible="bottomSheetVisible" :padding="EdgeInsets.all(24)">
      <Column main-axis-size="min" :gap="16">
        <Text :style="{ fontSize: 20, fontWeight: 'bold' }">Bottom Sheet</Text>
        <Text>This is a persistent bottom sheet.</Text>
        <Button @click="bottomSheetVisible = false">Close</Button>
      </Column>
    </BottomSheet>
  </Column>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { Column, Button, BottomSheet, Text, EdgeInsets } from "fluekit";

const bottomSheetVisible = ref(false);

const showBottomSheet = () => {
  bottomSheetVisible.value = true;
};
</script>

API

Props

NameTypeDefaultDescription
visiblebooleanfalseWhether the bottom sheet is visible.
barrierDismissiblebooleantrueWhether the bottom sheet can be dismissed by tapping outside.
backgroundColorstring'white'The background color of the bottom sheet.
elevationnumber8The z-coordinate at which to place this sheet relative to its parent.
shapeBorderRadius-The shape of the bottom sheet.
paddingEdgeInsets-The padding of the bottom sheet content.

Events

NameDescription
update:visibleEmitted when the visibility changes.
closeEmitted when the bottom sheet is closed.

Slots

NameDescription
defaultThe content of the bottom sheet.