Two little Bootstrap 5 Design Issues (Custom Switches and Alerts)

Wappler Version : 3.9.7
Operating System : Win 10 Pro
Server Model: NodeJS
Database Type: MariaDB
Hosting Type: Cloud

Expected behavior

  1. The design of the Bootstrap 5 Switch component should be showing correctly like that:
    switch1

  2. The design of the Bootstrap 5 Alert component should be showing correctly like that:

Actual behavior

  1. Here is how the Custom Switch is showing:
    switch2

  2. Here is how the alert is showing:
    alert2

How to reproduce

  1. Try to create a Custom Switch in your form.
  2. Try to add an Alert in your page.

1. For the Custom Switch, I noticed that Wappler uses “form-control” instead of “form-check”:

Wappler:
<div class="form-control form-switch">
  <input class="form-control-input" type="checkbox" value="" id="checkbox1" name="checkbox1">
  <label class="form-control-label" for="checkbox1">Default switch</label>
</div>

Bootstrap docs:
<div class="form-check form-switch">
  <input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault">
  <label class="form-check-label" for="flexSwitchCheckDefault">Default switch checkbox input</label>
</div>
  1. For the Alert, I noticed that Wappler is not adding the CSS class “alert-primary” or “alert-secondary” etc.
    Actually it is only adding type="secondary" but it’s not adding it for “primary” and it doesn’t seems to be working…

PS, I’ve fixed it on my project manually. :slight_smile:

Thanks!

Oops, just found another thing, the Select input.
The class added by default is “form-control”, but in Bootstrap 5, the right class is “form-select” :slight_smile:

With this new class, the little caret at the right is showing correctly.

1 Like

This has been fixed in Wappler 4.0.2

1 Like

This topic was automatically closed after 46 hours. New replies are no longer allowed.