{
  "element": "nve-iframe",
  "entrypoint": "@nvidia-elements/core/iframe/iframe.examples.json",
  "items": [
    {
      "id": "iframe",
      "name": "Default",
      "template": "<nve-iframe sandbox=\"allow-scripts\" aria-label=\"Elements iframe example\">\n  <template slot=\"head\">\n    <title>Elements iframe example</title>\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/bundles/index.css\" />\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/fonts/inter.css\" />\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/styles/dist/bundles/index.css\" />\n    <script type=\"module\" src=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/core/dist/bundles/index.min.js\"></script>\n  </template>\n  <template>\n    <nve-alert status=\"success\">isolated iframe content</nve-alert>\n  </template>\n</nve-iframe>\n",
      "summary": "Supplies the iframe with Elements themes, utilities, fonts, and component registrations through its head template. Use this structure because iframe documents do not inherit resources from the parent document.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "iframe-dynamic-height",
      "name": "DynamicHeight",
      "template": "<nve-iframe sandbox=\"allow-scripts\" aria-label=\"Dynamic height iframe example\" style=\"--border: 1px solid red\">\n  <template slot=\"head\">\n    <title>Dynamic iframe height</title>\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/bundles/index.css\" />\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/fonts/inter.css\" />\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/styles/dist/bundles/index.css\" />\n    <script type=\"module\" src=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/core/dist/bundles/index.min.js\"></script>\n  </template>\n  <template>\n    <nve-accordion behavior-expand>\n      <nve-accordion-header>\n        <h2 nve-text=\"heading xs medium\" slot=\"prefix\">Dynamic height in iframe</h2>\n      </nve-accordion-header>\n      <nve-accordion-content>\n        The iframe expands when this content opens and contracts when it closes.\n      </nve-accordion-content>\n    </nve-accordion>\n  </template>\n</nve-iframe>\n",
      "summary": "Synchronizes the iframe height with expandable content so the host layout avoids empty space or internal scrollbars. Use for previews whose intrinsic height changes after interaction.",
      "description": "",
      "composition": false,
      "tags": [
        "test-case"
      ]
    },
    {
      "id": "iframe-fixed-size",
      "name": "FixedSize",
      "template": "<nve-iframe sandbox=\"allow-scripts\" aria-label=\"Fixed-size iframe example\" style=\"--height: 256px; --width: 256px; --border: 1px solid red\">\n  <template><p style=\"height: 128px; width: 128px; margin: 1px; outline: 1px solid yellow;\">override iframe size</p></template>\n</nve-iframe>\n",
      "summary": "Overrides intrinsic iframe dimensions with `--width` and `--height` to create a stable preview viewport. Use when you need to inspect embedded content at a fixed size regardless of its rendered bounds.",
      "description": "",
      "composition": false,
      "tags": [
        "test-case"
      ]
    },
    {
      "id": "iframe-overflow-clip",
      "name": "OverflowClip",
      "template": "<nve-iframe sandbox=\"allow-scripts\" aria-label=\"Overflow clipping iframe example\" style=\"--height: 150px; --border: 1px solid red\">\n  <template slot=\"head\">\n    <title>Clipped iframe popover</title>\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/bundles/index.css\" />\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/fonts/inter.css\" />\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/styles/dist/bundles/index.css\" />\n    <script type=\"module\" src=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/core/dist/bundles/index.min.js\"></script>\n  </template>\n  <template>\n    <div nve-layout=\"pad:md\">\n      <nve-dropdown id=\"dropdown\">Popovers <strong>are clipped</strong> by the iframe.</nve-dropdown>\n      <nve-button popovertarget=\"dropdown\">Open popover</nve-button>\n    </div>\n  </template>\n</nve-iframe>\n",
      "summary": "The iframe browsing-context boundary clips popovers at its viewport and prevents them from escaping. Keep overlays inside the frame, or render them outside the iframe when they must overlap surrounding content.",
      "description": "",
      "composition": true,
      "tags": [
        "test-case"
      ]
    },
    {
      "id": "iframe-dynamically-updated-content",
      "name": "DynamicallyUpdatedContent",
      "template": "<nve-iframe sandbox=\"allow-scripts\" id=\"property-example\" aria-label=\"Dynamically updated iframe example\">\n  <template>\n    <p nve-text=\"body\">Initial iframe content.</p>\n  </template>\n</nve-iframe>\n<script type=\"module\">\n  document.querySelector(\"#property-example template\").innerHTML = '<p nve-text=\"body\">This template was dynamically updated.</p>';\n</script>\n",
      "summary": "Regenerates the iframe document when its source template changes. Use for live previews or generated output that must stay synchronized with edits made in the parent document.",
      "description": "",
      "composition": false,
      "tags": [
        "test-case"
      ]
    },
    {
      "id": "iframe-sandbox",
      "name": "Sandbox",
      "template": "<nve-iframe sandbox=\"allow-scripts\" aria-label=\"Trusted preview\" style=\"--width: 256px; --height: 128px\">\n  <template><p nve-text=\"body\">Trusted preview with explicit sandbox permissions.</p></template>\n</nve-iframe>\n",
      "summary": "Use explicit sandbox permissions to enable only the capabilities your content needs.",
      "description": "",
      "composition": false,
      "tags": []
    }
  ]
}