---
title: Modal
desc: Modal is used to show a dialog or a box when you click a button.
layout: components
classnames:
component:
- class: modal
desc: Modal
part:
- class: modal-box
desc: The content part
- class: modal-action
desc: Actions part (buttons, etc.)
- class: modal-backdrop
desc: Label that covers the page when modal is open so we can close the modal by clicking outside
- class: modal-toggle
desc: Hidden checkbox that controls the state of modal
modifier:
- class: modal-open
desc: Keeps the modal open (you can add this class using JS)
placement:
- class: modal-top
desc: Moves the modal to top
- class: modal-middle
desc: Moves the modal to middle
default: true
- class: modal-bottom
desc: Moves the modal to bottom
- class: modal-start
desc: Moves the modal to start horizontally
- class: modal-end
desc: Moves the modal to end horizontally
# browserSupport:
chrome: 37
firefox: 98
safari: 15.4
iossafari: 15.4
---
## There are 3 methods to use modals
1. [Using HTML `