--- title: "Modal" slug: modal category: component type: technical-information version: 20.0.0 tokens: 812 source: https://ovh.github.io/design-system/v20.0.0/llms/react-components-modal--technical-information.txt --- # Modal ## Modal | Property | Type | Required | Default | Description | |---|---|---|---|---| | `backdropStyle` | `CSSProperties` | No | undefined | Custom style applied to the modal backdrop. Useful if you want to override the backdrop z-index. | | `closeOnEscape` | `boolean` | No | undefined | Whether to close the modal when the escape key is pressed. | | `closeOnInteractOutside` | `boolean` | No | undefined | Whether to close the modal when the outside is clicked. | | `defaultOpen` | `boolean` | No | undefined | The initial open state of the modal. Use when you don't need to control the open state of the modal. | | `i18n` | `Partial` | No | undefined | Internal translations override. | | `initialFocusedElement` | `() => null | HTMLElement` | No | undefined | Element that receive the focus when the dialog is opened. | | `locale` | `'fr' | 'de' | 'en' | 'es' | 'it' | 'nl' | 'pl' | 'pt'` | No | undefined | The locale used for the translation of the internal elements. | | `onOpenChange` | `(detail: ModalOpenChangeDetail) => void` | No | undefined | Callback fired when the modal open state changes. | | `open` | `boolean` | No | undefined | The controlled open state of the modal. | | `positionerStyle` | `CSSProperties` | No | undefined | Custom style applied to the overlay positioner. Useful if you want to override the overlay z-index. | ## ModalBody This component extends all the native `
` attributes. _No specific property._ ## ModalContent This component extends all the native `
` attributes. | Property | Type | Required | Default | Description | |---|---|---|---|---| | `createPortal` | `boolean` | No | undefined | Whether the component should be rendered in the DOM close to the body tag. | | `dismissible` | `boolean` | No | undefined | Whether the remove button is displayed. | ## ModalHeader This component extends all the native `
` attributes. _No specific property._ ## ModalTrigger This component extends all the native `