diff --git a/docs/pages/frameworks/vue.md b/docs/pages/frameworks/vue.md index 5a63d32d..6416c2ce 100644 --- a/docs/pages/frameworks/vue.md +++ b/docs/pages/frameworks/vue.md @@ -107,6 +107,19 @@ When binding complex data such as objects and arrays, use the `.prop` modifier t ``` +### Two-way Binding + +One caveat is there's currently [no support for v-model on custom elements](https://github.com/vuejs/vue/issues/7830), but you can still achieve two-way binding manually. + +```html + + + + +``` + +If that's too verbose for your liking, you can use a custom directive instead. [This utility](https://www.npmjs.com/package/@shoelace-style/vue-sl-model) adds a custom directive that will work just like `v-model` but for Shoelace components. + :::tip Are you using Shoelace with Vue? [Help us improve this page!](https://github.com/shoelace-style/shoelace/blob/next/docs/frameworks/vue.md) :::