Search code examples
javascriptphphtmlsweetalert2

How do I display sweetalert2 radio options vertically?


I am working with sweetalert2 to create a popup list of radio options. My list of options are more than 3 and most are longer than 5 words. So, the display output is not nice since it is displayed horizontally, as you can see in the screenshot below.

What can I do so that the radio button will be displayed vertically?

Current output:


Solution

  • You can try add the css:

    .swal2-radio {
        display: grid !important;
    }