Skip to content

πŸ”₯ A nice clean and touch-friendly bottom sheet component based on Vue.js and Hammer.js for Vue 3 & Vue 2

Notifications You must be signed in to change notification settings

irhamustofa/vue-bottom-sheet

This branch is 21 commits behind vaban-ru/vue-bottom-sheet:master.

Folders and files

NameName
Last commit message
Last commit date
Dec 8, 2022
Dec 8, 2022
Dec 8, 2022
Dec 8, 2022
Dec 8, 2022
Dec 8, 2022
Dec 30, 2022
Dec 8, 2022
Dec 8, 2022
Dec 8, 2022
Dec 8, 2022

Repository files navigation

Example

Vue Bottom Sheet

Size Downloads Version

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

Installation

NPM

npm install @webzlodimir/vue-bottom-sheet

Yarn

yarn add @webzlodimir/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

Prop Type Description Example
overlay Boolean Remove back overlay :overlay="false"
click-to-close Boolean Click outside card to close :click-to-close="false"
max-width String Set max-width of component card max-width="640px"
max-height String Set max-height of component card max-height="90%"
effect String Set effect for component card effect="fx-fadein-scale"
rounded Boolean Round the top two corners of the sheet :rounded="false"
is-full-screen Boolean Enable or disable full-screen mode :is-full-screen="true"
swipe-able Boolean Enable or disable swipe to close :swipe-able="false"
overlay-color String Set overlay color with opacity :overlay-color="#0000004D"
background-scrollable Boolean Enable scroll :background-scrollable="true"
background-clickable Boolean Enable background click, doesn't work if click-to-close=true :background-clickable="true"

Events

Event Description Example
opened Fire when card component is opened @opened=""
closed Fire 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

About

πŸ”₯ A nice clean and touch-friendly bottom sheet component based on Vue.js and Hammer.js for Vue 3 & Vue 2

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vue 82.6%
  • TypeScript 9.4%
  • HTML 4.1%
  • JavaScript 3.9%