Skip to content

DraggableItemBottom

Overview

DraggableItemBottom provides a draggable panel that is anchored to the bottom of the container. It is useful for toolbars, notifications, or any content that should be accessible at the bottom and optionally draggable or expandable.

Props

PropDescriptionTypeRequiredDefault Value
titleTitle displayed in the bottom panel header.stringfalse-
disabledExpandDisables the expand/collapse feature.booleanfalsefalse
disabledHeaderHides the header section.booleanfalsefalse
disabledCloseHides the close button.booleanfalsefalse
disabledOrderDisables drag ordering with other items.booleanfalsefalse
containerIdID of the parent container (for teleporting).stringfalse-
showControls the visibility of the bottom panel.booleanfalsefalse
expandWhether the bottom panel is expanded.booleanfalsefalse

Events

NameDescription
update:expandEmitted when the expand state changes. Payload: (value:boolean)
closeEmitted when the bottom panel is closed. Payload: ()
update:showEmitted when the visibility changes. Payload: (value:boolean)

Slots

NameDescription
defaultContent of the bottom panel.
titleCustom content for the header area.
extra-btnExtra buttons in the header.

Usage

vue
<script setup lang="ts">
import { DraggableContainer, DraggableItemBottom } from '@hungpvq/vue-draggable';
</script>

<template>
  <DraggableContainer>
    <DraggableItemBottom title="Title" show>
      <div style="height: 100vh"></div>
    </DraggableItemBottom>
  </DraggableContainer>
</template>