UNPKG

common-intellisense

Version:
126 lines (125 loc) 3.89 kB
{ "props": [ { "Attribute": "children", "Type": "`ReactNode`", "Description": "The content of the modal. It's usually the `ModalContent`.", "Default": "-" }, { "Attribute": "size", "Type": "`xs` | `sm` | `md` | `lg` | `xl` | `2xl` | `3xl` | `4xl` | `5xl` | `full`", "Description": "The modal size. This changes the modal `max-width` and `height` (full).", "Default": "`md`" }, { "Attribute": "radius", "Type": "`none` | `sm` | `md` | `lg`", "Description": "The modal border radius.", "Default": "`lg`" }, { "Attribute": "shadow", "Type": "`none` | `sm` | `md` | `lg`", "Description": "The modal shadow.", "Default": "`lg`" }, { "Attribute": "backdrop", "Type": "`transparent` | `opaque` | `blur`", "Description": "The modal backdrop type.", "Default": "`opaque`" }, { "Attribute": "scrollBehavior", "Type": "`normal` | `inside` | `outside`", "Description": "The modal scroll behavior.", "Default": "`normal`" }, { "Attribute": "placement", "Type": "`auto` | `top` | `center` | `bottom`", "Description": "The modal position.", "Default": "`auto`" }, { "Attribute": "isOpen", "Type": "`boolean`", "Description": "Whether the modal is open by default (controlled).", "Default": "-" }, { "Attribute": "defaultOpen", "Type": "`boolean`", "Description": "Whether the modal is open by default (uncontrolled).", "Default": "-" }, { "Attribute": "isDismissable", "Type": "`boolean`", "Description": "Whether the modal can be closed by clicking on the overlay or pressing the <Kbd>Esc</Kbd> key.", "Default": "`true`" }, { "Attribute": "isKeyboardDismissDisabled", "Type": "`boolean`", "Description": "Whether pressing the <Kbd>Esc</Kbd> key to close the modal should be disabled.", "Default": "`false`" }, { "Attribute": "shouldBlockScroll", "Type": "`boolean`", "Description": "Whether the modal should block the scroll of the page on open.", "Default": "`true`" }, { "Attribute": "hideCloseButton", "Type": "`boolean`", "Description": "Whether to hide the modal close button.", "Default": "`false`" }, { "Attribute": "closeButton", "Type": "`ReactNode`", "Description": "Custom close button to display on top right corner.", "Default": "-" }, { "Attribute": "motionProps", "Type": "[MotionProps](#motion-props)", "Description": "The props to modify the framer motion animation. Use the `variants` API to create your own animation.", "Default": "" }, { "Attribute": "portalContainer", "Type": "`HTMLElement`", "Description": "The container element in which the overlay portal will be placed.", "Default": "`document.body`" }, { "Attribute": "disableAnimation", "Type": "`boolean`", "Description": "Whether the modal should not have animations.", "Default": "`false`" }, { "Attribute": "classNames", "Type": "`Record<\"wrapper\"\"base\"\"backdrop\"\"header\"\"body\"\"footer\"\"closeButton\", string>`", "Description": "Allows to set custom class names for the modal slots.", "Default": "-" } ], "link": "https://nextui.org/docs/components/modal", "events": [ { "Attribute": "onOpenChange", "Type": "`(isOpen: boolean) => void`", "Description": "Handler that is called when the modal's open state changes." }, { "Attribute": "onClose", "Type": "`() => void`", "Description": "Handler that is called when the modal is closed." } ] }