experiment_id: web-retrieval-v1
fixture_id: /demos/web-component-grid-mirrored-caption
mode: provenance
representation: html
origin_response_id: ea438708aeb11b982f1586b7f2e53b8d
version: 2026-10-21
version_created_at_utc: 2026-10-21T20:42:35.573Z
version_nonce: a21861ef87da966d98d11864b401faa3
generated_at_utc: 2026-10-22T20:39:57.915Z
response_nonce: 0ece197c8e093a813f7cc0d7ac0edd9e

Mirrored Caption

90 of 125
Add a caption to the top and bottom of your grid with <zg-caption mirror></zg-caption>.
Result Full HTML CSS JS
Edit Download
This is a caption position both on top and bottom

Full Code

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>ZingGrid Demo</title>
  <script nonce="undefined" src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
  <style>
    body {
      background: #e6e6e6;
    }

    zing-grid[loading] {
      height: 341px;
    }
  </style>
</head>

<body>
  <zing-grid data='[{"name": "Oreo","breed":"Mastiff"}, {"name": "Buddy","breed":"Greate Dane"}, {"name": "Max","breed":"Doodle"}]'>
    <!-- default is position top so we don't really need to set this attribute -->
    <zg-caption position="both">This is a caption position both on top and bottom</zg-caption>
  </zing-grid>
  <script>
    ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']);
  </script>
</body>

</html>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>ZingGrid Demo</title>
    <script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
  </head>
  <body>
    <zing-grid 
      data='[{"name": "Oreo","breed":"Mastiff"}, {"name": "Buddy","breed":"Greate Dane"}, {"name": "Max","breed":"Doodle"}]'>
    	<!-- default is position top so we don't really need to set this attribute --> 
      <zg-caption position="both">This is a caption position both on top and bottom</zg-caption>
    </zing-grid>
	</body>
</html>
body{background:#e6e6e6;}
// No JS code

Interested in this demo? Modify it to your needs in ZingSoft Studio, our testing sandbox. It's free to sign up, and you can come back and edit at any time!

Edit in Studio

Demo Gallery