Skip to content

Commit f8ce5b5

Browse files
committed
chore(docs): provide v-model example
1 parent a470d10 commit f8ce5b5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,26 @@ const close = () => {
7272
</template>
7373
```
7474

75+
## Usage with v-model
76+
77+
```vue
78+
<script setup lang="ts">
79+
import { ref } from "vue";
80+
81+
import BottomSheet from "@douxcode/vue-spring-bottom-sheet";
82+
import "@douxcode/vue-spring-bottom-sheet/dist/style.css";
83+
84+
const sheet = ref(false);
85+
86+
</script>
87+
88+
<template>
89+
<button type="button" @click="sheet = true"> Open bottom sheet </button>
90+
<BottomSheet v-model="sheet"> Your content </BottomSheet>
91+
</template>
92+
```
93+
94+
7595
## Usage in Nuxt 3
7696

7797
For Nuxt 3, just wrap component in `<ClientOnly>`

0 commit comments

Comments
 (0)