> For the complete documentation index, see [llms.txt](https://docs.hivepress.io/developer-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hivepress.io/developer-docs/framework/blocks/modal.md).

# Modal

This block type renders a modal window with inner blocks.

### Parameters

* **title** - the modal window title;
* **model** - an optional [model](/developer-docs/framework/models.md) name to make the window ID unique;
* all the parameters from the [Container](/developer-docs/framework/blocks/container.md) block type.

### Example

The code below renders a modal window with the "My Custom Text" title and a single inner block of the `content` type that outputs the "Hello World!" text. If you add a link with the `#my_custom_modal` URL anywhere on a page, it will open this modal window on click.

```php
echo ( new HivePress\Blocks\Modal(
	[
		'title'  => 'My Custom Text',
		'name'   => 'my_custom_modal',

		'blocks' => [
			'my_custom_block' => [
				'type'    => 'content',
				'content' => 'Hello World!',
				'_order'  => 123,
			],
		],
	]
) )->render();
```
