What is a modal?

Asked

Viewed 246 times

16

I started to maintain a project that is not mine, in ASP.NET and C#. but I believe that it serves other languages as well. In some actions of buttons appears this term "modal" and I am in doubt of anything.

  • 1

    Modal is a kind of pop-up. This link can help you https://getbootstrap.com/docs/4.0/components/modal/

  • 1

    It is the message window that leaves the screen opaque.

  • Related: https://answall.com/questions/351410/quais-as-diff%C3%A7as-entre-lightbox-e-modal-box/

3 answers

14


Modal is a screen (window) that blocks the main screen (window). It opens on top of a screen and does not allow you to interact with the parent screen until you complete the action that the modal screen wants you to do, which can only be to give an ok (or cancel in some cases), spend time to read, or eventually fill in some data. It is clear that this screen only exists because of the other and is her daughter.

It tends to maintain a momentary dialogue with the user, so it is usually a dialog box and many people confuse the two terms and think that one thing is the other. A modal does not need to be a dialog box and a dialog box can be modeless (the opposite of modal).

The main screen does not disappear while it is in the modal, it just becomes unable to access, in fact it is possible to see what is there and this can be useful. It is common to be able to move the modal from place (in general it is a smaller screen) to clear the view.

Some people consider it a misuse of UI and disrupts the user experience. Some errors that can happen are presented on Wikipedia (maybe I’ll bring it here later). A canvas modeless can give more flexibility, but also has its bad side allowing the person to do what should not.

I’ve seen shabby modal canvases go into a kind of deadlock :)

  • 2

    I was getting worried that people were using the web to set a modal example. I was positive and I am commenting because the blocking of the "parent screen" is the aspect that always passes beaten and should be highlighted to future readers.

8

A window or dialog box modal is a user interface element that requires a response from the software operator, allowing no further action until that response is given. A classic example are the save dialogs: either you save the file, or you cancel the save operation. Until the user does one of these actions, the dialog box is not closed, preventing any other action.

-2

Modal, is nothing more than a custom alert box containing information for a particular action.

In the example you gave, when you click a button, it can be a deletion confirmation, for example:

"Do you really want to delete this user?" Options: Yes, Cancel

You may have more information regarding this component here.


Edit: this answer takes a simplistic view of modal, summarizing it to a simple dialog box. According to comments on this answer and the content of other answers, there are other points that differentiate a modal from a dialog box.

  • 4

    This is the definition of dialog box.

  • On the Bootstrap website itself, the examples show a "Dialog box". Please base your answer, before simply negative.

  • 2

    I don’t think you understand the note of the colleague. Modal is a specific type of dialog box, but your answer deals with the generic case.

  • 3

    I did not deny, but you should base your answer. What you have on the Bootstrap site is an example as you yourself realize. A modal can be a dialog box, but not always. And what defines a modal is not being an alert as it is in your response, it is the fact that it is blocking. Bootstrap’s doc is very flawed in that and doesn’t have what you posted as an answer. Qq way what they call modal there is a bad and misused term, and the question is not about Bootstrap, the fact that you only know the term in this context only indicates that you should not answer.

  • 2

    I expected a first response like this your second, coming from someone with such a reputation. Thank you for better basing the answer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.