Angular Modal

Below is a static modal example (meaning its position and display have been overridden). Included are the modal header, modal body (required for padding), and modal footer (optional). We ask that you include modal headers with dismiss actions whenever possible, or provide another explicit dismiss action.

Modal title
Modal body text goes here.
Angular Modal Live demo

Toggle a working modal demo by clicking the button below. It will slide down and fade in from the top of the page.

Angular Modal Static backdrop

If you don’t provide an (visibleChange) handler to the Modal component, your modal will behave as though the backdrop is static, meaning it will not close when clicking outside it. Click the button below to try it.

Angular Modal Scrolling long content

If your modals are too long for the user’s viewport, they scroll the page by itself.

You can also create a scrollable modal that allows scroll the modal body by adding scrollable prop.

Angular Modal Vertically centered

Add alignment="center" to <c-modal> to vertically center the modal.

Angular Modal Tooltips and popovers

cTooltip and cPopover can be placed within modals as needed. When modals are closed, any tooltips and popovers within are also automatically dismissed.

Angular Modal Optional sizes

Modals have three optional sizes, available via modifier classes to be placed on a <c-modal>. These sizes kick in at certain breakpoints to avoid horizontal scrollbars on narrower viewports.

Size Property size Modal max-width
Small 'sm' 300px
Default None 500px
Large 'lg' 800px
Extra large 'xl' 1140px
Angular Modal Fullscreen Modal

Another override is the option to pop up a modal that covers the user viewport, available via property fullscreen.

Property fullscreen Availability
true Always
'sm' Below 576px
'md' Below 768px
'lg' Below 992px
'xl' Below 1200px
'xxl' Below 1400px
Modal title
Woohoo, you're reading this text in a modal!
Modal title
I will not close if you click outside of me. Don't even try to press escape key.
Modal title
Modal title
Modal title
Woohoo, you're reading this text in a modal!
Modal title

This is some placeholder content to show a vertically centered modal. We've added some extra copy here to show how vertically centering the modal works when combined with scrollable modals. We also use some repeated line breaks to quickly extend the height of the content, thereby triggering the scrolling. When content becomes longer than the predefined max-height of modal, content will be cropped and scrollable within the modal.











Just like that.

Modal title
Popover in a modal
This triggers a popover on click.

Popover title

And here’s some amazing content. It’s very engaging. Right?

Tooltips in a modal

This link and that link have tooltips on hover.

Extra large modal
...
Large modal
...
Small modal
...
Full screen
...
Full screen below sm
...
Full screen below md
...
Full screen below lg
...
Full screen below xl
...
Full screen below xxl
...

Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.

Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.

Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.

Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.

Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.

Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.