2.0.11 • Published 2 years ago

@antonosipov/vue-bottom-sheet v2.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

2.0.10

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago