{
  "element": "nve-codeblock",
  "entrypoint": "@nvidia-elements/code/codeblock/codeblock.examples.json",
  "items": [
    {
      "id": "code-codeblock",
      "name": "Default",
      "template": "<nve-codeblock language=\"typescript\"> function getTime(): number { return new Date().getTime(); } </nve-codeblock>\n",
      "summary": "Basic codeblock with syntax highlighting for source code.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "code-codeblock-flat",
      "name": "Flat",
      "template": "<nve-codeblock container=\"flat\" language=\"typescript\">\n  function getTime(): number { return new Date().getTime(); }\n</nve-codeblock>\n",
      "summary": "Codeblock with flat container styling for minimal visual emphasis.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "code-codeblock-theme",
      "name": "Theme",
      "template": "<nve-codeblock nve-theme=\"light\" language=\"typescript\">\n  function getTime(): number { return new Date().getTime(); }\n</nve-codeblock>\n<br />\n<nve-codeblock nve-theme=\"dark\" language=\"typescript\">\n  function getTime(): number { return new Date().getTime(); }\n</nve-codeblock>\n",
      "summary": "Light and dark theme variations for different UI contexts.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "code-codeblock-copy",
      "name": "Copy",
      "template": "<nve-codeblock language=\"typescript\">\n  <nve-icon-button slot=\"actions\" icon-name=\"copy\" container=\"flat\"></nve-icon-button>\n  function getTime(): number { return new Date().getTime(); }\n</nve-codeblock>\n",
      "summary": "Codeblock with copy button action for easy code sharing and reuse.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "code-codeblock-code",
      "name": "Code",
      "template": "<nve-codeblock language=\"typescript\" id=\"code-property\"></nve-codeblock>\n<script type=\"module\">\n  import \"@nvidia-elements/code/codeblock/define.js\";\n  import \"@nvidia-elements/code/codeblock/languages/typescript.js\";\n  const codeblock = document.querySelector(\"nve-codeblock#code-property\");\n  codeblock.code = 'console.log(\"hello, world!\")';\n</script>\n",
      "summary": "Codeblock using the code property for programmatic/dynamic usage.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "code-codeblock-line-numbers",
      "name": "LineNumbers",
      "template": "<nve-codeblock language=\"typescript\" line-numbers>\n  function getTime(): number { return new Date().getTime(); }\n</nve-codeblock>\n",
      "summary": "Codeblock with line numbers for easier code reference and debugging.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "code-codeblock-highlight",
      "name": "Highlight",
      "template": "<nve-codeblock language=\"typescript\" line-numbers highlight=\"2\">\n  function getTime(): number { return new Date().getTime(); }\n</nve-codeblock>\n",
      "summary": "Codeblock with specific line highlighting to draw attention to important code sections.",
      "description": "",
      "composition": false,
      "tags": []
    },
    {
      "id": "code-codeblock-overflow",
      "name": "Overflow",
      "template": "<nve-codeblock language=\"typescript\" line-numbers highlight=\"2\" style=\"height: 100px\">\n  import{LitElement as t,html as e}from\"lit\";import{property as s}from\"lit/decorators/property.js\";import{state as\n  o}from\"lit/decorators/state.js\"; import{unsafeHTML as i}from\"lit/directives/unsafe-html.js\"; import{useStyles as\n  r,shiftLeft as n}from\"@nvidia-elements/core/internal\"; import l from\"./codeblock.css.js\"; import a\n  from\"highlight.js/lib/core\"; import h from\"highlight.js/lib/languages/shell\";\n</nve-codeblock>\n",
      "summary": "Codeblock with constrained height for scrollable overflow behavior with long code.",
      "description": "",
      "composition": false,
      "tags": [
        "test-case"
      ]
    },
    {
      "id": "code-codeblock-line-wrap",
      "name": "LineWrap",
      "template": "\n<div nve-layout=\"column gap:md\">\n  <nve-codeblock language=\"json\" style=\"--white-space: pre-wrap; width: 400px;\">\n<template>\n[\n  {\"id\":\"h100\",\"name\":\"H100 SXM5\",\"series\":\"H100 Series\",\"architecture\":\"Hopper\",\"process_node\":\"4nm\",\"cuda_cores\":16896,\"rt_cores\":0,\"tensor_cores\":528,\"base_clock\":1410,\"boost_clock\":1980,\"memory\":{\"size\":\"80GB\",\"type\":\"HBM3\",\"bandwidth\":\"3350 GB/s\",\"bus_width\":5120},\"ai_performance\":{\"fp32_tflops\":67,\"tensor_tflops\":1979,\"transformer_engine\":true,\"fp8_support\":true,\"nvlink_bandwidth\":\"900 GB/s\"},\"power_consumption\":700,\"msrp\":25000,\"release_date\":\"2022-03-22\",\"ai_workloads\":[\"large_language_models\",\"training\",\"inference\",\"hpc\"]},\n  {\"id\":\"a100\",\"name\":\"A100 SXM4\",\"series\":\"A100 Series\",\"architecture\":\"Ampere\",\"process_node\":\"7nm\",\"cuda_cores\":6912,\"rt_cores\":0,\"tensor_cores\":432,\"base_clock\":765,\"boost_clock\":1410,\"memory\":{\"size\":\"80GB\",\"type\":\"HBM2e\",\"bandwidth\":\"2039 GB/s\",\"bus_width\":5120},\"ai_performance\":{\"fp32_tflops\":19.5,\"tensor_tflops\":624,\"sparsity_support\":true,\"multi_instance_gpu\":7,\"nvlink_bandwidth\":\"600 GB/s\"},\"power_consumption\":400,\"msrp\":15000,\"release_date\":\"2020-05-14\",\"ai_workloads\":[\"training\",\"inference\",\"data_analytics\",\"hpc\"]}\n]\n</template>\n  </nve-codeblock>\n\n  <nve-codeblock language=\"json\"  style=\"width: 400px;\">\n<template>\n[\n  {\"id\":\"h100\",\"name\":\"H100 SXM5\",\"series\":\"H100 Series\",\"architecture\":\"Hopper\",\"process_node\":\"4nm\",\"cuda_cores\":16896,\"rt_cores\":0,\"tensor_cores\":528,\"base_clock\":1410,\"boost_clock\":1980,\"memory\":{\"size\":\"80GB\",\"type\":\"HBM3\",\"bandwidth\":\"3350 GB/s\",\"bus_width\":5120},\"ai_performance\":{\"fp32_tflops\":67,\"tensor_tflops\":1979,\"transformer_engine\":true,\"fp8_support\":true,\"nvlink_bandwidth\":\"900 GB/s\"},\"power_consumption\":700,\"msrp\":25000,\"release_date\":\"2022-03-22\",\"ai_workloads\":[\"large_language_models\",\"training\",\"inference\",\"hpc\"]},\n  {\"id\":\"a100\",\"name\":\"A100 SXM4\",\"series\":\"A100 Series\",\"architecture\":\"Ampere\",\"process_node\":\"7nm\",\"cuda_cores\":6912,\"rt_cores\":0,\"tensor_cores\":432,\"base_clock\":765,\"boost_clock\":1410,\"memory\":{\"size\":\"80GB\",\"type\":\"HBM2e\",\"bandwidth\":\"2039 GB/s\",\"bus_width\":5120},\"ai_performance\":{\"fp32_tflops\":19.5,\"tensor_tflops\":624,\"sparsity_support\":true,\"multi_instance_gpu\":7,\"nvlink_bandwidth\":\"600 GB/s\"},\"power_consumption\":400,\"msrp\":15000,\"release_date\":\"2020-05-14\",\"ai_workloads\":[\"training\",\"inference\",\"data_analytics\",\"hpc\"]}\n]\n</template>\n  </nve-codeblock>\n</div>\n",
      "summary": "Comparison of line wrapping vs horizontal scrolling for long code lines in constrained widths.",
      "description": "",
      "composition": false,
      "tags": [
        "test-case"
      ]
    }
  ]
}