Semantic-UI loader inside <table>

11,608

A loader is not meant to contain the thing that's loading. It's used in conjunction with a dimmer.

<link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" rel="stylesheet" />
<div class="dimmable">
  <div class="ui active inverted dimmer">
    <div class="ui loader"></div>
  </div>
  <table class="ui unstackable striped table segment">
    <tr>
      <td>id</td>
      <td>name</td>
    </tr>
    <tr>
      <td>1</td>
      <td>test test</td>
    </tr>
  </table>
</div>

Or it can be standalone if inside a segment

<link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" rel="stylesheet" />
<div class="ui basic segment">
  <div class="ui active loader"></div>
  <table class="ui unstackable striped table segment">
    <tr>
      <td>id</td>
      <td>name</td>
    </tr>
    <tr>
      <td>1</td>
      <td>test test</td>
    </tr>
  </table>
</div>
Share:
11,608
PyQL
Author by

PyQL

Updated on July 23, 2022

Comments

  • PyQL
    PyQL almost 2 years

    I'm using ajax to update a table's contents, I would like to use the semantic-ui's built-in class "Loader" to show some loading animation at the center of the table while getting the contents but that does not seem to work with <table> tag.

    <div class="ui active loader">
      <table class="ui unstackable striped table segment">
        <tr><td>id</td><td>name</td></tr>
        <tr><td>1</td><td>test test</td></tr>
      </table>
    </div>
    

    How do I get this to work?