{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "grid-detail-template",
  "framework": "vue",
  "type": "registry:component",
  "component": "Grid",
  "variant": "detail-template",
  "dependencies": [
    "@syncfusion/ej2-vue-grids"
  ],
  "description": "Data grid with a detail row template that expands a row to reveal the shipped order lines and totals beneath it.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/vue/llms.txt",
    "skillPack": "syncfusion/vue-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/vue/grid-detail-template.md"
  },
  "files": [
    {
      "target": "src/components/grid-detail-template/Grid.vue",
      "content": "<template>\n<div class=\"col-lg-12\">\n  <div class=\"control-section\">\n    <ejs-grid :dataSource=\"data\" height=\"460\" :allowPaging=\"true\" :pageSettings=\"pageSettings\" :detailTemplate=\"'detailTemplate'\" gridLines=\"Horizontal\">\n      <e-columns>\n        <e-column field=\"OrderID\" headerText=\"Order\" width=\"110\" :isPrimaryKey=\"true\"></e-column>\n        <e-column field=\"CustomerName\" headerText=\"Customer\" width=\"240\"></e-column>\n        <e-column field=\"ShipCity\" headerText=\"City\" width=\"160\"></e-column>\n        <e-column field=\"ShipCountry\" headerText=\"Country\" width=\"150\"></e-column>\n        <e-column field=\"Freight\" headerText=\"Freight\" width=\"120\" format=\"C2\" textAlign=\"Right\"></e-column>\n      </e-columns>\n      <template v-slot:detailTemplate=\"{ data }\">\n        <div style=\"display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:16px;padding:16px 24px;background:#f8fafc\">\n          <div style=\"background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px\">\n            <h5 style=\"margin:0 0 12px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#64748b\">Shipment timeline</h5>\n            <div style=\"display:flex;align-items:flex-start;gap:12px;margin-bottom:14px\">\n              <span style=\"width:10px;height:10px;margin-top:5px;border-radius:50%;background:#6366f1;box-shadow:0 0 0 4px #e0e7ff;flex-shrink:0\"></span>\n              <div>\n                <div style=\"font-weight:600;color:#0f172a\">Order placed</div>\n                <div style=\"font-size:12px;color:#64748b\">{{ fmt(data.OrderDate) }}</div>\n              </div>\n            </div>\n            <div style=\"display:flex;align-items:flex-start;gap:12px\">\n              <span style=\"width:10px;height:10px;margin-top:5px;border-radius:50%;background:#6366f1;box-shadow:0 0 0 4px #e0e7ff;flex-shrink:0\"></span>\n              <div>\n                <div style=\"font-weight:600;color:#0f172a\">Shipped</div>\n                <div style=\"font-size:12px;color:#64748b\">{{ fmt(data.ShippedDate) }} · {{ days(data) }} days after order</div>\n              </div>\n            </div>\n          </div>\n          <div style=\"background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px\">\n            <h5 style=\"margin:0 0 12px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#64748b\">Delivery address</h5>\n            <div style=\"font-weight:600;color:#0f172a\">{{ data.ShipName }}</div>\n            <div style=\"color:#475569;margin-top:4px\">{{ data.ShipAddress }}</div>\n            <div style=\"color:#475569\">{{ data.ShipCity }}, {{ data.ShipCountry }}</div>\n          </div>\n          <div style=\"background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px\">\n            <h5 style=\"margin:0 0 12px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#64748b\">Freight charge</h5>\n            <div style=\"font-size:28px;font-weight:700;color:#0f172a\">${{ Number(data.Freight).toFixed(2) }}</div>\n            <div style=\"font-size:12px;color:#64748b;margin-top:4px\">Customer {{ data.CustomerID }}</div>\n          </div>\n        </div>\n      </template>\n    </ejs-grid>\n  </div>\n</div>\n</template>\n\n<script lang=\"ts\">\nimport { GridComponent, ColumnDirective, ColumnsDirective, Page, DetailRow } from \"@syncfusion/ej2-vue-grids\";\nimport { orderData } from '../datasource/grid-data';\n\nexport default {\n  components: { 'ejs-grid': GridComponent, 'e-column': ColumnDirective, 'e-columns': ColumnsDirective },\n  data: function() {\n    return { data: orderData, pageSettings: { pageSize: 8 } };\n  },\n  methods: {\n    fmt: (d: any) => new Date(d).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' }),\n    days: (o: any) => Math.max(0, Math.round((new Date(o.ShippedDate).getTime() - new Date(o.OrderDate).getTime()) / 86400000))\n  },\n  provide: { grid: [Page, DetailRow] }\n}\n</script>"
    }
  ]
}