# Modal

Modals are a great way to display additional content without taking visitors away from the current page. They’re perfect for things like forms, galleries, announcements, or anything that needs a little more focus.

In Elements, modals are easy to set up and fully customisable, you can trigger them from buttons, links, or other interactive components. When opened, the modal appears above your content with a subtle background overlay, helping draw attention to what matters.

Whether you’re collecting signups or showcasing a product feature, the Modal component gives you a clean, accessible way to do it.

### Modal Close Component

The Modal Close component is used to close an open modal, simple as that!

It can be added anywhere inside your modal content, and is most commonly used as a button or icon in the top-right corner. You can fully style it to match your design, and even add multiple close buttons if needed (handy for “Cancel” actions at the bottom of a form, for example).

When clicked, it seamlessly hides the modal and returns the user to the main content, no extra setup required.

{% embed url="<https://youtu.be/Ye1Eyfyh3DE?si=LQiriRcrp0urI0VU>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.realmacsoftware.com/elements-docs/elements/components/modal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
