Alert like Modal

I wanted many functionalities in my alert so i implemented all the things i a modal…now i want to cutomize this modal as an alert like not taking the whole space on the screen and showing the bg on the space left outsude our modal.

please help thanks in advance

there is a component call Popover that exactly fit your needs