• Get Started
    • Introduction
    • Installation
    • Theming
  • Layout
    • Drawer
    • Footer
    • Hero
    • Indicator
    • Join
    • Stack
    • Divider
  • Navigation
    • Breadcrumbs
    • Dock
    • Menu
    • Link
    • Navbar
    • Pagination
    • Steps
    • Tabs
  • Data Display
    • Accordion
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Chat
    • Collapse
    • Countdown
    • Diff
    • Kbd
    • List
    • Mask
    • Mockup
    • Stat
    • Table
    • Timeline
  • Feedback
    • Alert
    • Loading
    • Modal
    • Progress
    • Skeleton
    • Status
    • Toast
    • Tooltip
  • Forms
    • Button
    • Checkbox
    • Dropdown
    • File Input
    • Fieldset
    • Filter
    • Input
    • Label
    • Radio
    • Range
    • Rating
    • Select
    • Toggle
    • Textarea
  • Effects
    • Hover 3D Card
    • Hover Gallery
    • Speed Dial
    • Swap
    • Text Rotate
    • Theme Controller
jsx daisyUI

    No recently viewed docs

  • Get Started
    • Introduction
    • Installation
    • Theming
  • Layout
    • Drawer
    • Footer
    • Hero
    • Indicator
    • Join
    • Stack
    • Divider
  • Navigation
    • Breadcrumbs
    • Dock
    • Menu
    • Link
    • Navbar
    • Pagination
    • Steps
    • Tabs
  • Data Display
    • Accordion
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Chat
    • Collapse
    • Countdown
    • Diff
    • Kbd
    • List
    • Mask
    • Mockup
    • Stat
    • Table
    • Timeline
  • Feedback
    • Alert
    • Loading
    • Modal
    • Progress
    • Skeleton
    • Status
    • Toast
    • Tooltip
  • Forms
    • Button
    • Checkbox
    • Dropdown
    • File Input
    • Fieldset
    • Filter
    • Input
    • Label
    • Radio
    • Range
    • Rating
    • Select
    • Toggle
    • Textarea
  • Effects
    • Hover 3D Card
    • Hover Gallery
    • Speed Dial
    • Swap
    • Text Rotate
    • Theme Controller

© 2026 jsx-daisyui. All rights reserved. | Built with DaisyUI and React.

Modal

A modal overlays the page to focus user attention on a single task, decision, or piece of information. It blocks interaction with the rest of the page until dismissed.

Installation
npx jsx-daisyui add modal

Default

modal-default

With actions

modal-with-actions

Responsive

modal-responsive

API Reference

Modal

PropTypeDefaultDescription
placement'top' | 'middle' | 'bottom' | 'start' | 'end''middle'The placement of the modal on the screen.
responsiveboolean-If true, positions the modal at the bottom on mobile screens and in the middle on larger screens.
closeOnBackdropbooleantrueIf true, clicking outside the modal will close it.

Modal.Box

PropTypeDefaultDescription
childrenReact.ReactNode-The content rendered inside the modal box.

Modal.Header

PropTypeDefaultDescription
titlestring-The title of the modal.
descriptionstring-An optional description rendered below the title.

Modal.Body

PropTypeDefaultDescription
childrenReact.ReactNode-The main content of the modal.

Modal.Actions

PropTypeDefaultDescription
childrenReact.ReactNode-Action buttons rendered at the bottom of the modal, typically confirm and cancel controls.

Modal.Close

PropTypeDefaultDescription
childrenReact.ReactNode'✕'The content of the close button. Defaults to a close symbol.
onClickReact.MouseEventHandler<HTMLButtonElement>-Additional click handler called when the close button is clicked.

useModal

PropTypeDefaultDescription
refReact.RefObject<HTMLDialogElement>-Ref to attach to the Modal element.
isOpenboolean-The current open state of the modal.
open() => void-Opens the modal.
close() => void-Closes the modal.
toggle() => void-Toggles the modal between open and closed.

Hello!

Press ESC key or click outside to close

Are you sure?

This action cannot be undone. This will permanently delete your account.

Responsive modal

Opens at bottom on mobile, center on desktop.