@takuma-ru/vue-swipe-modal

Swipeable Bottom Sheet library for vue2 and vue3
86,104 66
Install
npm install @takuma-ru/vue-swipe-modal
Latest Version:5.0.5
Vue:3
Older releases:2
License:MIT
Last Updated:Oct 21, 2024
Links: GitHub  ·  npm
Maintainer: takuma-ru

@takuma-ru/vue-swipe-modal

featureGraphic npm npm bundle size (scoped)

Description

Modal window that can be swiped to close.(Swipeable Bottom Sheet) ⚠️ WARN ⚠️ Due to the eol of vue2, vue2 is no longer supported. vue2 can be used with v4.0.7 or earlier, but we are not responsible for any problems that may occur.

DEMO

Directory

Documentation

vue-swipe-modal-docs.takumaru.dev

Getting Started

1. Install

vue3
npm i @takuma-ru/vue-swipe-modal@^5.0.0
vue2 (deprecated)
npm i @takuma-ru/vue-swipe-modal@^4.0.0 @vue/composition-api

2. Use

Import and use the modal with the vue file you want to use.

<script lang="ts" setup>
import { ref } from "vue";
import { SwipeModal } from "@takuma-ru/vue-swipe-modal";

const isOpen = ref(false);
</script>

<template>
	<button @click="isOpen = true">
		Open modal
	</button>
	<SwipeModal
		v-model="isOpen"
		snap-point="auto"
	>
		<button @click="isOpen = false">
			Close modal
		</button>
		Modal content
	</SwipeModal>
</template>

<style lang="scss" scoped>
:deep(.modal-style) {
	box-sizing: border-box;
	width: 100%;
	color: white;
	background-color: #1d1b20;
	border-radius: 1rem 1rem 0 0;

	@media (prefers-color-scheme: light) {
		color: black;
		background-color: #f7f2fa;
		box-shadow: 0 1px 4px 0 rgb(0 0 0 / 37%);
	}
}
</style>

License

MIT - Copyright (c) 2023 takuma-ru

Related Packages

@nosadev/vue-bottom-sheet

A Swipeable Bottom Sheet library for and vue3

7,768 14
@auswuchs/vue-dialog

Modern programmatic way to use dialogs in vue

718 4
@byloth/vuert

The headless alerts, modals, notifications & popups library for Vue.js craftsmen...

2,508 5
@byloth/nuxt-vuert-module

The headless alerts, modals, notifications & popups module for Nuxt.js craftsmen...

1,896 5
vue-script-insert

Module to dynamically load external js into spa

3,187 2

Version History

Version Released License
5.0.5 MIT
5.0.4 MIT
5.0.3 MIT
5.0.2 MIT
5.0.1 MIT
Pre-releases (29)
Version Released License
5.0.3-beta.0 MIT
5.0.2-beta.0 MIT
5.0.0-beta.2 MIT
5.0.0-beta.1 MIT
5.0.0-beta.0 MIT