Responsive table in UIBUILDER?

Has anyone managed to build a responsive table in UIBUILDER?
The docs are a bit sparse in the table area:

I have tried to use this flow to get started, but just get a blank template:


By responsive I mean when the browser page size shrinks, the columns drop to card view so no data is cut or removed out of the table and no horizontal scrolling is required.

If there are no examples, what Google terms / keywords would I use to search and build said table?

Thanks for pointing me in the right direction.

Not much in the docs because, with UIBUILDER, you can use standard web techniques. :slight_smile:

But a true responsive table isn't a simple thing, particularly if you have many columns.

However, this is quite a decent method though it is a little long in the tooth now and I would recommend using flex or grid:

Which basically uses CSS to change the various table elements to display as not a table.

See options 4 & 5 in this example for grid-based options which would be a more modern approach.

And this is perhaps and even better modern example:

Or there is this example using flex:

:sparkling_heart:The nice thing about all of these is that they are pure CSS. Which means that you can still use UIBUILDER's no-/low-code features and still get your responsiveness.

I dropped the HTML and CSS from How to Build a Stylish, Responsive HTML Table - Web Design into UIBUILDER.

The page renders differently.

The header is missing for example, also the page is not responsive like their example etc.

Im guessing I don't have the correct template selected?


Try disabling the brand CSS import - quite possibly something is clashing.

The template shouldn't matter, the default should be fine.

Actually, just quickly tried it and it worked fine. I added their CSS to index.css and the index.html, I integrated their code:

<!doctype html>
<html lang="en"><head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="../uibuilder/images/node-blue.ico">

    <title>Responsive Table Example - Node-RED uibuilder</title>
    <meta name="description" content="Node-RED uibuilder - Responsive Table Example">

    <!-- Your own CSS (defaults to loading uibuilders css)-->
    <link type="text/css" rel="stylesheet" href="./index.css" media="all">

    <!-- #region Supporting Scripts. These MUST be in the right order. Note no leading / -->
    <script defer src="../uibuilder/uibuilder.iife.min.js"></script>
    <!-- <script defer src="./index.js">/* OPTIONAL: Put your custom code in that */</script> -->
    <!-- #endregion -->

</head><body class="uib">
    <div class="container">
        <h1 class="with-subtitle">Responsive Table Example</h1>
        <div role="doc-subtitle">Using Node-RED and the UIBUILDER IIFE library.</div>
        <div id="more"><!-- '#more' is used as a parent for dynamic HTML content in examples --></div>
        <h2>Some of Steven Spielberg’s Movies</h2>
          <thead class="visible@l">
              <td><strong class="hidden@l">Title:</strong> Firelight</td>
                <strong class="hidden@l">Year:</strong> 1964
                <img width="140" height="209" src="" alt="Firelight">
              <td><strong class="hidden@l">Stars:</strong> Robert Robyn, Beth Weber, Lucky Lohr, Margaret Peyou</td>
                <strong class="hidden@l">Plot:</strong> Menacing flying saucers attack the citizens of a town
              <td><strong class="hidden@l">Title:</strong> Duel</td>
                <strong class="hidden@l">Year:</strong> 1971
                <img width="140" height="209" src="" alt="Duel">
              <td><strong class="hidden@l">Stars:</strong> Dennis Weaver, Jacqueline Scott, Eddie Firestone, Lou Frizzell</td>
                <strong class="hidden@l">Plot:</strong> A business commuter is pursued and terrorized by the malevolent driver of a massive tractor-trailer.
              <td><strong class="hidden@l">Title:</strong> The Sugarland Express</td>
                <strong class="hidden@l">Year:</strong> 1974
                <img width="140" height="209" src="" alt="The Sugarland Express">
              <td><strong class="hidden@l">Stars:</strong> Goldie Hawn, Ben Johnson, Michael Sacks, William Atherton</td>
                <strong class="hidden@l">Plot:</strong> A woman attempts to reunite her family by helping her husband escape prison and together kidnapping their son. But things don't go as planned when they are forced to take a police hostage on the road.
              <td><strong class="hidden@l">Title:</strong> Jaws</td>
                <strong class="hidden@l">Year:</strong>1975
                <img width="140" height="209" src="" alt="Jaws">
              <td><strong class="hidden@l">Stars:</strong> Roy Scheider, Robert Shaw, Richard Dreyfuss, Lorraine Gary</td>
                <strong class="hidden@l">Plot:</strong> When a killer shark unleashes chaos on a beach community off Cape Cod, it's up to a local sheriff, a marine biologist, and an old seafarer to hunt the beast down.
              <td><strong class="hidden@l">Title:</strong> Close Encounters of the Third Kind</td>
                <strong class="hidden@l">Year:</strong>
                <img width="140" height="209" src="" alt="Close Encounters of the Third Kind">
              <td><strong class="hidden@l">Stars:</strong> Richard Dreyfuss, François Truffaut, Teri Garr, Melinda Dillon</td>
                <strong class="hidden@l">Plot:</strong> Roy Neary, an Indiana electric lineman, finds his quiet and ordinary daily life turned upside down after a close encounter with a UFO, spurring him to an obsessed cross-country quest for answers as a momentous event approaches.
              <td><strong class="hidden@l">Title:</strong> 1941</td>
                <strong class="hidden@l">Year:</strong> 1979
                <img width="140" height="209" src="" alt="1941">
              <td><strong class="hidden@l">Stars:</strong> John Belushi, Dan Aykroyd, Treat Williams, Nancy Allen</td>
                <strong class="hidden@l">Plot:</strong> Hysterical Californians prepare for a Japanese invasion in the days after Pearl Harbor.
        <p class="table-credits">Table info by <a href="" target="_blank"></a></p>
      <footer class="page-footer">
        <span>made by </span>
        <a href="" target="_blank">
          <img width="24" height="24" src="" alt="George Martsoukos logo">


All worked as expected.




This is about my 8th attempt to use UIBUILDER... Clearly its not for me.
Thanks for the sanity check everyone.

Looks like I am going back to dash 1.0....

I'd love to get to the bottom of where you are getting stuck. The basics really are quite simple (and not Elon Musk simple either! :slight_smile: ) though I recognise that perhaps the detail in the documentation may still be quite confusing for some. I'm really keen to make entry easier for everyone though.

As in this case, the only knowledge needed was how to grab the HTML and CSS from the example and merge it into the uibuilder template which can be done using the files tab in the Editor or using VScode via the built-in editor link. I realise that is not zero-code by any means but it isn't difficult either. Not casting aspersions at you in any way incidentally, I get that something is getting in your way and I'm keen to try and find out what so that we can eliminate it.