Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@takuma-ru/vue-swipe-modal
Advanced tools
Modal window that can be swiped to close.(Swipeable Bottom Sheet)
yarn add @takuma-ru/vue-swipe-modal@^4.0.0
<template>
<div>
<button @click="modal = true">open</button>
<swipe-modal
v-model="modal"
contents-height="50vh"
border-top-radius="16px"
>
<h1>contents</h1>
</swipe-modal>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import swipeModal from '@takuma-ru/vue-swipe-modal'
const modal = ref(false)
</script>
<template>
<div>
<button @click="modal = true">open</button>
<swipe-modal
v-model="modal"
contents-height="50vh"
border-top-radius="16px"
>
<h1>contents</h1>
</swipe-modal>
</div>
</template>
<script lang="ts">
import { defineComponent, ref, reactive } from '@vue/composition-api';
import { swipeModal } from '@takuma-ru/vue-swipe-modal'
export default defineComponent({
components: {
swipeModal,
},
setup () {
const modal = ref<boolean>(false)
return {
modal,
}
}
})
</script>
<!-- for Vue2 -->
<template>
<div>
<button @click="modal = true">open</button>
<swipe-modal
v-model="modal"
contents-height="50vh"
border-top-radius="16px"
>
<h1>contents</h1>
</swipe-modal>
</div>
</template>
<script lang="ts">
import { defineComponent, ref, reactive } from '@vue/composition-api';
import { swipeModal } from '@takuma-ru/vue-swipe-modal'
export default defineComponent({
components: {
swipeModal,
},
setup () {
const modal = ref<boolean>(false)
return {
modal,
}
}
})
</script>
Variable | Type | default | Details |
---|---|---|---|
v-model | Boolean | false | Control the opening and closing |
dark | Boolean | false | Dark mode |
Function | Type | Details |
---|---|---|
@open | Void | Function to execute when a modal is opened |
@close | Void | Function to execute when the modal closes |
Variable | Type | default | Details |
---|---|---|---|
persistent | Boolean | false | Don't close it by pressing background (out of modal) |
backgroundColor | String | #80808080 | Background (out of modal) color |
Variable | Type | default | Details |
---|---|---|---|
fullscreen | Boolean | false | Display in full screen mode (height: 100%) |
noTip | Boolean | false | Don't show the chip at the top of the modal. |
contents-width | String | 100% | Width of the modal |
contents-height | String | 30vh | Height of the modal |
border-top-radius | String | null | Radius at the top of the modal(This value takes precedence) |
border-top-left-radius | String | 0px | Modal upper left radius |
border-top-right-radius | String | 0px | Modal upper right radius |
contents-color | String | white | Modal background color |
tip-color | String | #c8c8c8 | Tip chip color |
dark-contents-color | String | black | Modal background color in dark mode |
FAQs
Swipeable Bottom Sheet library for vue2 and vue3
The npm package @takuma-ru/vue-swipe-modal receives a total of 934 weekly downloads. As such, @takuma-ru/vue-swipe-modal popularity was classified as not popular.
We found that @takuma-ru/vue-swipe-modal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.