2.0.11 • Published 11 months ago

@antonosipov/vue-bottom-sheet v2.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Nuxt Bottom Sheet

Size Downloads Version

A nice clean and touch-friendly bottom sheet component based on Vue.js and Hammer.js for Nuxt 3

Installation

NPM

npm install @antonosipov/vue-bottom-sheet

Yarn

yarn add @antonosipov/vue-bottom-sheet

Usage

<template>
  <vue-bottom-sheet ref="myBottomSheet">
    <h1>Lorem Ipsum</h1>
    <h2>What is Lorem Ipsum?</h2>
    <p>
      <strong>Lorem Ipsum</strong> is simply dummy text
    </p>
  </vue-bottom-sheet>
</template>

<script setup>
import { VueBottomSheet } from "@webzlodimir/vue-bottom-sheet";
import  "@webzlodimir/vue-bottom-sheet/dist/style.css";
import { ref } from "vue";

const myBottomSheet = ref(null)

const open = () => {
  myBottomSheet.value.open();
}

const close = () => {
  myBottomSheet.value.close();
}
</script>

Props

PropTypeDescriptionExample
overlayBooleanRemove back overlay:overlay="false"
click-to-closeBooleanClick outside card to close:click-to-close="false"
max-widthStringSet max-width of component cardmax-width="640px"
max-heightStringSet max-height of component cardmax-height="90%"
effectStringSet effect for component cardeffect="fx-fadein-scale"
roundedBooleanRound the top two corners of the sheet:rounded="false"
is-full-screenBooleanEnable or disable full-screen mode:is-full-screen="true"
swipe-ableBooleanEnable or disable swipe to close:swipe-able="false"
overlay-colorStringSet overlay color with opacity:overlay-color="#0000004D"
background-scrollableBooleanEnable scroll:background-scrollable="true"
background-clickableBooleanEnable background click, doesn't work if click-to-close=true:background-clickable="true"

Events

EventDescriptionExample
openedFire when card component is opened@opened=""
closedFire when card component is closed@closed=""

List of effects

  • fx-default
  • fx-fadein-scale
  • fx-slide-from-right
  • fx-slide-from-left

You can see all the effects on the demo page

2.0.11

11 months ago

2.0.10

12 months ago

2.0.9

12 months ago

2.0.8

12 months ago

2.0.7

12 months ago

2.0.6

12 months ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago