## Import

```jsx
import { Drawer } from "@cfa/react-core";
```

## Live Editor

```jsx
<Drawer.Root>
  <Button>Open Drawer</Button>
  <Drawer.Tray>
    <Drawer.Title>Edit supplier</Drawer.Title>
    <Drawer.Content>
      <p>Update supplier contact details and notification preferences.</p>
    </Drawer.Content>
    <Drawer.Footer>
      <Drawer.CloseButton fullWidth>Cancel</Drawer.CloseButton>
      <Button fullWidth>Save</Button>
    </Drawer.Footer>
  </Drawer.Tray>
</Drawer.Root>
```

## Guidelines

### When to use

- Drawer is for ancillary tasks on the current page, such as filters, detail panels, or short forms, without navigating away.

### Do

- Default to right-side entry. Use left when the related content sits on the left side of the page.
- Use Confirm + Cancel or Destructive + Cancel in the footer when the drawer includes actions. Follow Button guidance for labels.
- Include a close control. Allow backdrop and Esc dismiss only when backing out will not lose data or interrupt a required flow.

### Avoid

- Nesting Drawers or opening a Modal from a Drawer.
- Using Drawer for status or feedback. Use Toast, BannerMessage, or MessageBlock.
- Using Drawer for a blocking decision people must acknowledge before continuing. Use Modal.

## Examples

### Composition

Compose `Drawer.Title`, `Drawer.Content`, and `Drawer.Footer` as **direct children** of `Drawer.Tray`:

- `Drawer.Title` — drawer title and accessible name
- `Drawer.Content` — scrollable body content
- `Drawer.Footer` — action buttons; stays visible when it is a direct child of `Drawer.Tray`
- `Drawer.CloseButton` — pre-styled cancel/dismiss button

`Drawer.Tray` applies layout padding and section spacing. `Drawer.Content` styles the scrollable body region only. Do not nest `Drawer.Title` or `Drawer.Footer` inside `Drawer.Content`.

Use a drawer for forms and longer side tasks. Use a modal for short blocking confirmations instead.

### Form task

Place the form in `Drawer.Content` and submit actions in `Drawer.Footer`.

```jsx
<Drawer.Root>
  <Button>Open Drawer</Button>
  <Drawer.Tray>
    <Drawer.Title>Edit supplier</Drawer.Title>
    <Drawer.Content>
      <Form
        id="drawer-form"
        onSubmit={(event) => {
          event.preventDefault();
        }}
      >
        <TextInput name="name" label="Supplier name" isRequired />
        <TextInput name="email" label="Email" type="email" isRequired />
        <Select.Root name="category">
          <Select.Label>Category</Select.Label>
          <Select.Button>
            <Select.Value />
          </Select.Button>
          <Select.Popover>
            <Select.List>
              <Select.Item id="produce">Produce</Select.Item>
              <Select.Item id="dairy">Dairy</Select.Item>
              <Select.Item id="poultry">Poultry</Select.Item>
            </Select.List>
          </Select.Popover>
        </Select.Root>
        <CheckboxGroup label="Notifications" name="notifications">
          <Checkbox value="email">Email updates</Checkbox>
          <Checkbox value="sms">SMS updates</Checkbox>
        </CheckboxGroup>
      </Form>
    </Drawer.Content>
    <Drawer.Footer>
      <Drawer.CloseButton fullWidth>Cancel</Drawer.CloseButton>
      <Button fullWidth type="submit" form="drawer-form">
        Save
      </Button>
    </Drawer.Footer>
  </Drawer.Tray>
</Drawer.Root>
```

### Controlled Drawer

Control the open state from the parent component with `isOpen` and `onOpenChange`.

```jsx
function ControlledExample() {
  const [open, setOpen] = React.useState(false);
  return (
    <Drawer.Root>
      <Button onPress={() => setOpen(true)}>Open Drawer</Button>
      <Drawer.Tray isOpen={open} onOpenChange={setOpen}>
        <Drawer.Title>Edit supplier</Drawer.Title>
        <Drawer.Content>
          <p>Update supplier contact details and notification preferences.</p>
        </Drawer.Content>
        <Drawer.Footer>
          <Drawer.CloseButton fullWidth>Cancel</Drawer.CloseButton>
          <Button fullWidth onPress={() => setOpen(false)}>
            Save
          </Button>
        </Drawer.Footer>
      </Drawer.Tray>
    </Drawer.Root>
  );
}
```

### Dismissable Drawer

Allow closing by clicking outside the drawer or pressing `ESC`. When using `Drawer.Overlay`, pass `isDismissable` to `Overlay` instead of `Tray`.

```jsx
<Drawer.Root>
  <Button>Open Drawer</Button>
  <Drawer.Tray isDismissable>
    <Drawer.Title>Edit supplier</Drawer.Title>
    <Drawer.Content>
      <p>Update supplier contact details and notification preferences.</p>
    </Drawer.Content>
    <Drawer.Footer>
      <Drawer.CloseButton fullWidth>Cancel</Drawer.CloseButton>
      <Button fullWidth>Save</Button>
    </Drawer.Footer>
  </Drawer.Tray>
</Drawer.Root>
```

### Hide close icon

Hide the top close icon when actions in `Drawer.Footer` should be the primary way to dismiss the drawer.

```jsx
<Drawer.Root>
  <Button>Open Drawer</Button>
  <Drawer.Tray isCloseButtonHidden isDismissable>
    <Drawer.Title>Edit supplier</Drawer.Title>
    <Drawer.Content>
      <p>Update supplier contact details and notification preferences.</p>
    </Drawer.Content>
    <Drawer.Footer>
      <Drawer.CloseButton fullWidth>Cancel</Drawer.CloseButton>
      <Button fullWidth>Save</Button>
    </Drawer.Footer>
  </Drawer.Tray>
</Drawer.Root>
```

### Custom Overlay

`Drawer.Overlay` is optional — use it only to customize the backdrop (for example, background color or `className`). For stacking conflicts, add `isolation: isolate` to your app wrapper instead of setting `z-index` on the overlay. When using a custom Overlay tree, pass `isDismissable` and `isKeyboardDismissDisabled` to `Overlay`, not `Tray`.

```jsx
<Drawer.Root>
  <Button>Open Drawer</Button>
  <Drawer.Overlay isDismissable>
    <Drawer.Tray>
      <Drawer.Title>Edit supplier</Drawer.Title>
      <Drawer.Content>
        <p>Update supplier contact details and notification preferences.</p>
      </Drawer.Content>
      <Drawer.Footer>
        <Drawer.CloseButton fullWidth>Cancel</Drawer.CloseButton>
        <Button fullWidth>Save</Button>
      </Drawer.Footer>
    </Drawer.Tray>
  </Drawer.Overlay>
</Drawer.Root>
```

### Size and position

Prefer the `size` and `position` props over custom width styles.

```jsx
<Drawer.Root>
  <Button>Open Drawer</Button>
  <Drawer.Tray size="lg" position="left">
    <Drawer.Title>Edit supplier</Drawer.Title>
    <Drawer.Content>
      <p>Update supplier contact details and notification preferences.</p>
    </Drawer.Content>
    <Drawer.Footer>
      <Drawer.CloseButton fullWidth>Cancel</Drawer.CloseButton>
      <Button fullWidth>Save</Button>
    </Drawer.Footer>
  </Drawer.Tray>
</Drawer.Root>
```

### Custom Styling

Use CSS classes or inline styles only when the built-in `size` options are not enough.

```jsx
<Drawer.Root>
  <Button>Open Drawer</Button>
  <Drawer.Tray className="my-drawer">
    <Drawer.Title>Edit supplier</Drawer.Title>
    <Drawer.Content>
      <p>Update supplier contact details and notification preferences.</p>
    </Drawer.Content>
    <Drawer.Footer>
      <Drawer.CloseButton fullWidth>Cancel</Drawer.CloseButton>
      <Button fullWidth>Save</Button>
    </Drawer.Footer>
  </Drawer.Tray>
</Drawer.Root>
```

## Props

### Drawer.Root

| Name | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| children\* | `ReactNode` | - | - |
| defaultOpen | `boolean` | - | Whether the overlay is open by default (uncontrolled). |
| isOpen | `boolean` | - | Whether the overlay is open by default (controlled). |
| onOpenChange | `((isOpen: boolean) => void)` | - | Handler that is called when the overlay's open state changes. |

### Drawer.CloseButton

| Name | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| fullWidth | `boolean` | `false` | Renders the Button in with a fluid width |
| isDisabled | `boolean` | - | Whether the button is disabled. |
| isPending | `boolean` | - | Whether the button is in a pending state. This disables press and hover events while retaining the ability to focus, and announces the pending state to screen readers. |
| ref | `Ref<HTMLButtonElement>` | - | Requires React 19 |
| size | `"lg" \ | "md" \ | "sm"` | `md` | Determines the size of the Button |
| variant | `"destructive" \ | "primary" \ | "secondary" \ | "tertiary"` | `secondary` | Variant for the button. |
| aria-controls | `string` | - | Identifies the element (or elements) whose contents or presence are controlled by the current element. |
| aria-current | `"date" \ | "false" \ | "location" \ | "page" \ | "step" \ | "time" \ | "true" \ | boolean` | - | Indicates whether this element represents the current item within a container or set of related elements. |
| aria-describedby | `string` | - | Identifies the element (or elements) that describes the object. |
| aria-details | `string` | - | Identifies the element (or elements) that provide a detailed, extended description for the object. |
| aria-disabled | `"false" \ | "true" \ | boolean` | - | Indicates whether the element is disabled to users of assistive technology. |
| aria-expanded | `"false" \ | "true" \ | boolean` | - | Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. |
| aria-haspopup | `"dialog" \ | "false" \ | "grid" \ | "listbox" \ | "menu" \ | "tree" \ | "true" \ | boolean` | - | Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. |
| aria-label | `string` | - | Defines a string value that labels the current element. |
| aria-labelledby | `string` | - | Identifies the element (or elements) that labels the current element. |
| aria-pressed | `"false" \ | "mixed" \ | "true" \ | boolean` | - | Indicates the current "pressed" state of toggle buttons. |
| autoFocus | `boolean` | - | Whether the element should receive focus on render. |
| children | `ChildrenOrFunction<ButtonRenderProps>` | - | The children of the component. A function may be provided to alter the children based on component state. |
| className | `ClassNameOrFunction<ButtonRenderProps>` | `'react-aria-Button'` | The CSS \[className]\(https\://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. |
| dir | `string` | - | - |
| excludeFromTabOrder | `boolean` | - | Whether to exclude the element from the sequential tab order. If true, the element will not be focusable via the keyboard by tabbing. This should be avoided except in rare scenarios where an alternative means of accessing the element or its functionality via the keyboard is available. |
| form | `string` | - | The \`\<form>\` element to associate the button with. The value of this attribute must be the id of a \`\<form>\` in the same document. See \[MDN]\(https\://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#form). |
| formAction | `string \ | ((formData: FormData) => void \ | Promise<void>)` | - | The URL that processes the information submitted by the button. Overrides the action attribute of the button's form owner. |
| formEncType | `string` | - | Indicates how to encode the form data that is submitted. |
| formMethod | `string` | - | Indicates the HTTP method used to submit the form. |
| formNoValidate | `boolean` | - | Indicates that the form is not to be validated when it is submitted. |
| formTarget | `string` | - | Overrides the target attribute of the button's form owner. |
| hidden | `boolean` | - | - |
| id | `string` | - | The element's unique identifier. See \[MDN]\(https\://developer.mozilla.org/en-US/docs/Web/HTML/Global\_attributes/id). |
| inert | `boolean` | - | - |
| lang | `string` | - | - |
| name | `string` | - | Submitted as a pair with the button's value as part of the form data. |
| onAnimationEnd | `AnimationEventHandler<HTMLButtonElement>` | - | - |
| onAnimationEndCapture | `AnimationEventHandler<HTMLButtonElement>` | - | - |
| onAnimationIteration | `AnimationEventHandler<HTMLButtonElement>` | - | - |
| onAnimationIterationCapture | `AnimationEventHandler<HTMLButtonElement>` | - | - |
| onAnimationStart | `AnimationEventHandler<HTMLButtonElement>` | - | - |
| onAnimationStartCapture | `AnimationEventHandler<HTMLButtonElement>` | - | - |
| onAuxClick | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onAuxClickCapture | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onBlur | `((e: FocusEvent<Element, Element>) => void)` | - | Handler that is called when the element loses focus. |
| onClickCapture | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onContextMenu | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onContextMenuCapture | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onDoubleClick | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onDoubleClickCapture | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onFocus | `((e: FocusEvent<Element, Element>) => void)` | - | Handler that is called when the element receives focus. |
| onFocusChange | `((isFocused: boolean) => void)` | - | Handler that is called when the element's focus status changes. |
| onGotPointerCapture | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onGotPointerCaptureCapture | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onHoverChange | `((isHovering: boolean) => void)` | - | Handler that is called when the hover state changes. |
| onHoverEnd | `((e: HoverEvent) => void)` | - | Handler that is called when a hover interaction ends. |
| onHoverStart | `((e: HoverEvent) => void)` | - | Handler that is called when a hover interaction starts. |
| onKeyDown | `((e: KeyboardEvent) => void)` | - | Handler that is called when a key is pressed. |
| onKeyUp | `((e: KeyboardEvent) => void)` | - | Handler that is called when a key is released. |
| onLostPointerCapture | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onLostPointerCaptureCapture | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onMouseDown | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseDownCapture | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseEnter | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseLeave | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseMove | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseMoveCapture | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseOut | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseOutCapture | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseOver | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseOverCapture | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseUp | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onMouseUpCapture | `MouseEventHandler<HTMLButtonElement>` | - | - |
| onPointerCancel | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerCancelCapture | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerDown | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerDownCapture | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerEnter | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerLeave | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerMove | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerMoveCapture | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerOut | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerOutCapture | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerOver | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerOverCapture | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerUp | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPointerUpCapture | `PointerEventHandler<HTMLButtonElement>` | - | - |
| onPressChange | `((isPressed: boolean) => void)` | - | Handler that is called when the press state changes. |
| onPressEnd | `((e: PressEvent) => void)` | - | Handler that is called when a press interaction ends, either over the target or when the pointer leaves the target. |
| onPressStart | `((e: PressEvent) => void)` | - | Handler that is called when a press interaction starts. |
| onPressUp | `((e: PressEvent) => void)` | - | Handler that is called when a press is released over the target, regardless of whether it started on the target or not. |
| onScroll | `UIEventHandler<HTMLButtonElement>` | - | - |
| onScrollCapture | `UIEventHandler<HTMLButtonElement>` | - | - |
| onTouchCancel | `TouchEventHandler<HTMLButtonElement>` | - | - |
| onTouchCancelCapture | `TouchEventHandler<HTMLButtonElement>` | - | - |
| onTouchEnd | `TouchEventHandler<HTMLButtonElement>` | - | - |
| onTouchEndCapture | `TouchEventHandler<HTMLButtonElement>` | - | - |
| onTouchMove | `TouchEventHandler<HTMLButtonElement>` | - | - |
| onTouchMoveCapture | `TouchEventHandler<HTMLButtonElement>` | - | - |
| onTouchStart | `TouchEventHandler<HTMLButtonElement>` | - | - |
| onTouchStartCapture | `TouchEventHandler<HTMLButtonElement>` | - | - |
| onTransitionCancel | `TransitionEventHandler<HTMLButtonElement>` | - | - |
| onTransitionCancelCapture | `TransitionEventHandler<HTMLButtonElement>` | - | - |
| onTransitionEnd | `TransitionEventHandler<HTMLButtonElement>` | - | - |
| onTransitionEndCapture | `TransitionEventHandler<HTMLButtonElement>` | - | - |
| onTransitionRun | `TransitionEventHandler<HTMLButtonElement>` | - | - |
| onTransitionRunCapture | `TransitionEventHandler<HTMLButtonElement>` | - | - |
| onTransitionStart | `TransitionEventHandler<HTMLButtonElement>` | - | - |
| onTransitionStartCapture | `TransitionEventHandler<HTMLButtonElement>` | - | - |
| onWheel | `WheelEventHandler<HTMLButtonElement>` | - | - |
| onWheelCapture | `WheelEventHandler<HTMLButtonElement>` | - | - |
| preventFocusOnPress | `boolean` | - | Whether to prevent focus from moving to the button when pressing it.&#xA;&#xA;Caution, this can make the button inaccessible and should only be used when alternative keyboard interaction is provided, such as ComboBox's MenuTrigger or a NumberField's increment/decrement control. |
| render | `DOMRenderFunction<"button", ButtonRenderProps>` | - | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components.&#xA;&#xA;Requirements:&#xA;&#xA;- You must render the expected element type (e.g. if \`\<button>\` is expected, you cannot render an \`\<a>\`).&#xA;- Only a single root DOM element can be rendered (no fragments).&#xA;- You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate. |
| slot | `string \ | null` | - | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit \`null\` value indicates that the local props completely override all props received from a parent. |
| style | `StyleOrFunction<ButtonRenderProps>` | - | The inline \[style]\(https\://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. A function may be provided to compute the style based on component state. |
| suppressHydrationWarning | `boolean` | - | A React-only flag that suppresses the warning React normally logs when an element's server-rendered content doesn't match the client render during hydration. See \[React docs]\(https\://react.dev/reference/react-dom/client/hydrateRoot#suppressing-unavoidable-hydration-mismatch-errors). |
| translate | `"no" \ | "yes"` | - | - |
| type | `"button" \ | "reset" \ | "submit"` | `'button'` | The behavior of the button when used in an HTML form. |
| value | `string` | - | The value associated with the button's name when it's submitted with the form data. |

### Drawer.Content

| Name | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| children | `ReactNode` | - | The content or child elements nested within this component. |
| className | `string` | - | CSS class names to apply custom styling. |
| id | `string` | - | The unique identifier for the DOM element. |
| role | `AriaRole` | - | The ARIA role assigned to the element to improve accessibility. Example roles include "button", "navigation", "dialog", etc. |
| style | `CSSProperties` | - | Inline styles specified as a React-compatible CSS properties object. |

### Drawer.Footer

| Name | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| children | `ReactNode` | - | The content or child elements nested within this component. |
| className | `string` | - | CSS class names to apply custom styling. |
| id | `string` | - | The unique identifier for the DOM element. |
| role | `AriaRole` | - | The ARIA role assigned to the element to improve accessibility. Example roles include "button", "navigation", "dialog", etc. |
| style | `CSSProperties` | - | Inline styles specified as a React-compatible CSS properties object. |

### Drawer.Overlay

| Name | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| children\* | `ReactNode` | - | - |
| isDismissable | `boolean` | `false` | Enables the drawer to be closed by clicking outside of the drawer |
| className | `ClassNameOrFunction<ModalRenderProps>` | `'react-aria-ModalOverlay'` | The CSS \[className]\(https\://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. |
| defaultOpen | `boolean` | - | Whether the overlay is open by default (uncontrolled). |
| dir | `string` | - | - |
| hidden | `boolean` | - | - |
| inert | `boolean` | - | - |
| isEntering | `boolean` | - | Whether the modal is currently performing an entry animation. |
| isExiting | `boolean` | - | Whether the modal is currently performing an exit animation. |
| isKeyboardDismissDisabled | `boolean` | `false` | Whether pressing the escape key to close the modal should be disabled. |
| isOpen | `boolean` | - | Whether the overlay is open by default (controlled). |
| lang | `string` | - | - |
| onAnimationEnd | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAnimationEndCapture | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAnimationIteration | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAnimationIterationCapture | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAnimationStart | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAnimationStartCapture | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAuxClick | `MouseEventHandler<HTMLDivElement>` | - | - |
| onAuxClickCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onClick | `MouseEventHandler<HTMLDivElement>` | - | - |
| onClickCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onContextMenu | `MouseEventHandler<HTMLDivElement>` | - | - |
| onContextMenuCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onDoubleClick | `MouseEventHandler<HTMLDivElement>` | - | - |
| onDoubleClickCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onEnter | `((element: HTMLElement) => void \ | Promise<void>)` | - | Callback when the modal starts entering. Return a promise to indicate when the entry animation has completed. |
| onExit | `((element: HTMLElement) => void \ | Promise<void>)` | - | Callback when the modal starts exiting. Return a promise to indicate when the exit animation has completed. |
| onGotPointerCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onGotPointerCaptureCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onLostPointerCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onLostPointerCaptureCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onMouseDown | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseDownCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseEnter | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseLeave | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseMove | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseMoveCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseOut | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseOutCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseOver | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseOverCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseUp | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseUpCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onOpenChange | `((isOpen: boolean) => void)` | - | Handler that is called when the overlay's open state changes. |
| onPointerCancel | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerCancelCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerDown | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerDownCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerEnter | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerLeave | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerMove | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerMoveCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerOut | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerOutCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerOver | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerOverCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerUp | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerUpCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onScroll | `UIEventHandler<HTMLDivElement>` | - | - |
| onScrollCapture | `UIEventHandler<HTMLDivElement>` | - | - |
| onTouchCancel | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchCancelCapture | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchEnd | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchEndCapture | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchMove | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchMoveCapture | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchStart | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchStartCapture | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTransitionCancel | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionCancelCapture | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionEnd | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionEndCapture | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionRun | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionRunCapture | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionStart | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionStartCapture | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onWheel | `WheelEventHandler<HTMLDivElement>` | - | - |
| onWheelCapture | `WheelEventHandler<HTMLDivElement>` | - | - |
| render | `DOMRenderFunction<"div", ModalRenderProps>` | - | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components.&#xA;&#xA;Requirements:&#xA;&#xA;- You must render the expected element type (e.g. if \`\<button>\` is expected, you cannot render an \`\<a>\`).&#xA;- Only a single root DOM element can be rendered (no fragments).&#xA;- You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate. |
| slot | `string \ | null` | - | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit \`null\` value indicates that the local props completely override all props received from a parent. |
| style | `StyleOrFunction<ModalRenderProps>` | - | The inline \[style]\(https\://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. A function may be provided to compute the style based on component state. |
| suppressHydrationWarning | `boolean` | - | A React-only flag that suppresses the warning React normally logs when an element's server-rendered content doesn't match the client render during hydration. See \[React docs]\(https\://react.dev/reference/react-dom/client/hydrateRoot#suppressing-unavoidable-hydration-mismatch-errors). |
| translate | `"no" \ | "yes"` | - | - |
| UNSTABLE\_deferUntilEntered | `boolean` | - | Whether to wait until the entry animation completes before hiding content outside the modal and moving focus into it. |
| UNSTABLE\_overrideFocus | `boolean` | - | Whether to override the \`focus()\` method so it does not scroll the page. This is temporary and will be removed after fully testing all overlays. |

### Drawer.Title

| Name | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| className | `string` | - | CSS class names to apply custom styling. |
| id | `string` | - | The unique identifier for the DOM element. |
| role | `AriaRole` | - | The ARIA role assigned to the element to improve accessibility. Example roles include "button", "navigation", "dialog", etc. |
| style | `CSSProperties` | - | Inline styles specified as a React-compatible CSS properties object. |
| children | `ReactNode` | - | The content or child elements nested within this component. |
| level | `number` | `3` | The heading level. |

### Drawer.Tray

| Name | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| children | `ReactNode` | - | - |
| isCloseButtonHidden | `boolean` | `false` | Removes the close button from the drawer |
| isDismissable | `boolean` | `false` | Enables the drawer to be closed by clicking outside of the drawer |
| position | `"left" \ | "right"` | `"right"` | Which edge of the viewport the drawer is anchored to. |
| size | `"lg" \ | "md" \ | "sm"` | `'md'` | Size of the drawer |
| className | `ClassNameOrFunction<ModalRenderProps>` | `'react-aria-ModalOverlay'` | The CSS \[className]\(https\://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. |
| defaultOpen | `boolean` | - | Whether the overlay is open by default (uncontrolled). |
| dir | `string` | - | - |
| hidden | `boolean` | - | - |
| inert | `boolean` | - | - |
| isEntering | `boolean` | - | Whether the modal is currently performing an entry animation. |
| isExiting | `boolean` | - | Whether the modal is currently performing an exit animation. |
| isKeyboardDismissDisabled | `boolean` | `false` | Whether pressing the escape key to close the modal should be disabled. |
| isOpen | `boolean` | - | Whether the overlay is open by default (controlled). |
| lang | `string` | - | - |
| onAnimationEnd | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAnimationEndCapture | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAnimationIteration | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAnimationIterationCapture | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAnimationStart | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAnimationStartCapture | `AnimationEventHandler<HTMLDivElement>` | - | - |
| onAuxClick | `MouseEventHandler<HTMLDivElement>` | - | - |
| onAuxClickCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onClick | `MouseEventHandler<HTMLDivElement>` | - | - |
| onClickCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onContextMenu | `MouseEventHandler<HTMLDivElement>` | - | - |
| onContextMenuCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onDoubleClick | `MouseEventHandler<HTMLDivElement>` | - | - |
| onDoubleClickCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onEnter | `((element: HTMLElement) => void \ | Promise<void>)` | - | Callback when the modal starts entering. Return a promise to indicate when the entry animation has completed. |
| onExit | `((element: HTMLElement) => void \ | Promise<void>)` | - | Callback when the modal starts exiting. Return a promise to indicate when the exit animation has completed. |
| onGotPointerCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onGotPointerCaptureCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onLostPointerCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onLostPointerCaptureCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onMouseDown | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseDownCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseEnter | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseLeave | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseMove | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseMoveCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseOut | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseOutCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseOver | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseOverCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseUp | `MouseEventHandler<HTMLDivElement>` | - | - |
| onMouseUpCapture | `MouseEventHandler<HTMLDivElement>` | - | - |
| onOpenChange | `((isOpen: boolean) => void)` | - | Handler that is called when the overlay's open state changes. |
| onPointerCancel | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerCancelCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerDown | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerDownCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerEnter | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerLeave | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerMove | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerMoveCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerOut | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerOutCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerOver | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerOverCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerUp | `PointerEventHandler<HTMLDivElement>` | - | - |
| onPointerUpCapture | `PointerEventHandler<HTMLDivElement>` | - | - |
| onScroll | `UIEventHandler<HTMLDivElement>` | - | - |
| onScrollCapture | `UIEventHandler<HTMLDivElement>` | - | - |
| onTouchCancel | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchCancelCapture | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchEnd | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchEndCapture | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchMove | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchMoveCapture | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchStart | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTouchStartCapture | `TouchEventHandler<HTMLDivElement>` | - | - |
| onTransitionCancel | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionCancelCapture | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionEnd | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionEndCapture | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionRun | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionRunCapture | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionStart | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onTransitionStartCapture | `TransitionEventHandler<HTMLDivElement>` | - | - |
| onWheel | `WheelEventHandler<HTMLDivElement>` | - | - |
| onWheelCapture | `WheelEventHandler<HTMLDivElement>` | - | - |
| render | `DOMRenderFunction<"div", ModalRenderProps>` | - | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components.&#xA;&#xA;Requirements:&#xA;&#xA;- You must render the expected element type (e.g. if \`\<button>\` is expected, you cannot render an \`\<a>\`).&#xA;- Only a single root DOM element can be rendered (no fragments).&#xA;- You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate. |
| slot | `string \ | null` | - | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit \`null\` value indicates that the local props completely override all props received from a parent. |
| style | `StyleOrFunction<ModalRenderProps>` | - | The inline \[style]\(https\://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. A function may be provided to compute the style based on component state. |
| suppressHydrationWarning | `boolean` | - | A React-only flag that suppresses the warning React normally logs when an element's server-rendered content doesn't match the client render during hydration. See \[React docs]\(https\://react.dev/reference/react-dom/client/hydrateRoot#suppressing-unavoidable-hydration-mismatch-errors). |
| translate | `"no" \ | "yes"` | - | - |
| UNSTABLE\_deferUntilEntered | `boolean` | - | Whether to wait until the entry animation completes before hiding content outside the modal and moving focus into it. |
| UNSTABLE\_overrideFocus | `boolean` | - | Whether to override the \`focus()\` method so it does not scroll the page. This is temporary and will be removed after fully testing all overlays. |