2.0.4 • Published 2 years ago

nekoo_vue_swipemodal v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

nekoo_vue_swipemodal v2.x

WARNING!

  • The latest version is 2.

    Note that the component names and available props are still different.
  • New package name: @takuma-ru/vue-swipe-modal

    The name of this package has been changed! Install the package at the following link. @takuma-ru/vue-swipe-modal(New package link)
  • End of Support.

    Version 2.0.5 and later will not be supported due to the above package transition. For 2.0.5 and later, please use @takuma-ru/vue-swpie-modal.

Description

Modal window that can be swiped to close.(Swipeable Bottom Sheet)

DEMO

https://vue-swipe-modal.vercel.app/

Getting Started

  1. Install
npm i nekoo_vue_swipemodal
yarn add nekoo_vue_swipemodal
  1. Come on, let's use it.
<template>
  <div>
    <button @click="modal = true">open</button>

    <swipe-modal
      v-model="modal"
      contents-height="80vh"
      contents-width="100%"
      border-top-radius="20px"
    >
      <h1>contents</h1>
    </swipe-modal>
  </div>
</template>

<script>
import swipeModal from 'nekoo_vue_swipemodal'
import 'nekoo_vue_swipemodal/dist/swipemodal.css'

export default {
  name: 'App',

  data() {
    return {
      modal: false
    }
  },

  components: {
    swipeModal
  }
}
</script>

Props

Modal General

VariableTypedefaultDetails
v-modelBooleanfalseControl the opening and closing
darkBooleanfalseDark mode

Background

VariableTypedefaultDetails
persistentBooleanfalseDon't close it by pressing background (out of modal)
backgroundColorString#80808080Background (out of modal) color

Modal

VariableTypedefaultDetails
fullscreenBooleanfalseDisplay in full screen mode (height: 100%)
noTipBooleanfalseDon't show the chip at the top of the modal.
contents-widthString100%Width of the modal
contents-heightString30vhHeight of the modal
border-top-radiusStringnullRadius at the top of the modal(This value takes precedence)
border-top-left-radiusString0pxModal upper left radius
border-top-right-radiusString0pxModal upper right radius
contents-colorStringwhiteModal background color
tip-colorString#c8c8c8Tip chip color
dark-contents-colorStringblackModal background color in dark mode
1.0.1

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago