--- description: Display a modal within your application. links: - label: GitHub icon: i-simple-icons-github to: https://github.com/nuxtlabs/ui/blob/dev/src/runtime/components/overlays/Modal.vue - label: 'Dialog' icon: i-simple-icons-headlessui to: 'https://headlessui.com/vue/dialog' --- ## Usage Use a `v-model` to control the Modal state. ::component-example #default :modal-example-basic #code ```vue ``` :: You can put a [Card](/layout/card) component inside your Modal to handle forms and take advantage of `header` and `footer` slots: ::component-example #default :modal-example-card #code ```vue ``` :: ### Disable overlay Set the `overlay` prop to `false` to disable it. ::component-example #default :modal-example-disable-overlay #code ```vue ``` :: ### Disable transition Set the `transition` prop to `false` to disable it. ::component-example #default :modal-example-disable-transition #code ```vue ``` :: ### Prevent close Use the `prevent-close` prop to disable the outside click alongside the `esc` keyboard shortcut. ::component-example #default :modal-example-prevent-close #code ```vue ``` :: You can still handle the `esc` shortcut yourself by using our [defineShortcuts](/getting-started/shortcuts#defineshortcuts) composable. ```vue ``` ### Fullscreen Set the `fullscreen` prop to `true` to enable it. ::component-example #default :modal-example-fullscreen #code ```vue ``` :: ## Props :component-props ## Preset :component-preset