Can't decide between Elm-bootstrap or Semantic-UI (with and without JS)

From prior experience at work with both Bootstrap and Semantic-UI, I can say that on the CSS-side, Semantic-UI definitely is a lot cleaner, both in immediate usage (the naming of the classes) and extensibility (Bootstrap overrides many more things than it needs, over-uses !important and is quite restrictive in how you write your HTML.)

Compare Bootstrap’s Nav example with Semantic-UI’s Menu example and you immediately see the difference:

<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <a class="navbar-brand" href="#">Navbar</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav">
      <li class="nav-item active">
        <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Features</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Pricing</a>
      </li>
      <li class="nav-item">
        <a class="nav-link disabled" href="#">Disabled</a>
      </li>
    </ul>
  </div>
</nav>
<div class="ui menu">
  <div class="header item">
    Our Company
  </div>
  <a class="item">
    About Us
  </a>
  <a class="item">
    Jobs
  </a>
  <a class="item">
    Locations
  </a>
</div>

Using Semantic ‘batteries included’ with JS will not work well: Most of the JS attaches event handlers to existing HTML elements, which Elm’s VDOM manager might replace at any time.

However, I have used Semantic-UI (only the CSS part, without the JS) in two different Elm-related projects now, and I am loving it! Most of the more involved JS-functionality Semantic-UI provides is based around:

  • Custom dropdowns or (searchable) selects: This might be the most ‘painful’ thing to miss, but something that can be emulated by one of the Elm Select wrappers (I’ve previously used SelectTwo) without that much of a hassle.
  • Opening/closing of modals. In the end, the actual visibility or not of the modal screens is managed by CSS classes, rather than JS-animations, so emulating this from Elm is very easy.