---
title: Modal
description: Modal API.
---

import CodeSnippetMD from '@slint/common-files/src/components/CodeSnippetMD.astro';
import SlintProperty from '@slint/common-files/src/components/SlintProperty.astro';

<CodeSnippetMD imagePath="" noScreenShot scale="3" imageWidth="300" imageHeight="200" imageAlt="">
```slint
import { Modal } from "@material";
export component Example inherits Window {
    width: 400px;
    height: 300px;
    background: transparent;
    Modal {
        width: parent.width;
        height: parent.height;
    }
}
```
</CodeSnippetMD>

A `Modal` is a backdrop overlay that blocks interaction with the content behind it and can contain modal content.

## Callbacks

### clicked()
Invoked when the modal background is clicked.