Skip to content

Sheet

Off-Canvas container.

Usage

Simple Usage

vue
<template>
  <p-sheet v-model="isOpen">
    <div class="p-4">
      Hello World
    </div>
  </p-sheet>
</template>

<script setup lang="ts">
  const isOpen = ref(true)
</script>

Position

There are 4 positions you can use, left, right, top and bottom. Default is left.

vue
<template>
  <p-sheet v-model="model" position="left">
    <div class="p-4">
      Position Left
    </div>
  </p-sheet>
  <p-sheet v-model="model2" position="top">
    <div class="p-4">
      Position Top
    </div>
  </p-sheet>
  <p-sheet v-model="model3" position="right">
    <div class="p-4">
      Position Right
    </div>
  </p-sheet>
  <p-sheet v-model="model4" position="bottom">
    <div class="p-4">
      Position Bottom
    </div>
  </p-sheet>
</template>

Sizing

There are 4 sizes you can use, sm, md, lg and xl. Default is sm.

vue
<template>
  <p-sheet v-model="modelSM" size="sm">
    <div class="p-4">
      Small
    </div>
  </p-sheet>
  <p-sheet v-model="modelMD" size="md">
    <div class="p-4">
      Medium
    </div>
  </p-sheet>
  <p-sheet v-model="modelLG" size="lg">
    <div class="p-4">
      Large
    </div>
  </p-sheet>
  <p-sheet v-model="modelXL" size="xl">
    <div class="p-4">
      Extra Large
    </div>
  </p-sheet>
</template>

API

Props

PropsTypeDefaultDescription
positionStringleftSheet positions, valid value: left, right, top, bottom
sizeStringsmSheet size, valid value: sm, md, lg, xl
noCloseOnEscBooleanfalseNo close modal while Escape was pressed
noCloseOnBackdropBooleanfalseDisabled close when click on backdrop

Slots

NameDescription
defaultContent to place inside the sheet

Events

NameArgumentsDescription
close-Event when sheet wµill closed

See Also

Released under the MIT License.