{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "grid-row-template",
  "framework": "react",
  "type": "registry:component",
  "component": "Grid",
  "variant": "row-template",
  "dependencies": [
    "@syncfusion/ej2-react-grids",
    "@syncfusion/ej2-react-buttons"
  ],
  "description": "Data grid with a row template that renders a full order card per row with customer avatar, ship-to details, and status chip.",
  "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/react/llms.txt",
    "skillPack": "syncfusion/react-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/react/ts/grid-row-template.md"
  },
  "files": [
    {
      "target": "src/components/grid-row-template/Grid.tsx",
      "content": "import { GridComponent, ColumnsDirective, ColumnDirective } from '@syncfusion/ej2-react-grids';\nimport { ChipListComponent } from '@syncfusion/ej2-react-buttons';\nimport { orderDetails } from '../datasource/grid-data';\n\nconst palette: string[] = ['#6366f1', '#0ea5e9', '#10b981', '#f59e0b', '#ec4899', '#8b5cf6'];\nconst colorFor = (text: string): string => palette[[...text].reduce((sum, ch) => sum + ch.charCodeAt(0), 0) % palette.length];\nconst initials = (name: string): string => name.trim().split(/\\s+/).map((p) => p[0]).slice(0, 2).join('').toUpperCase();\nconst daysToShip = (o: any): number => Math.max(0, Math.round((new Date(o.ShippedDate).getTime() - new Date(o.OrderDate).getTime()) / 86400000));\nconst statusOf = (days: number): string => (days <= 5 ? 'Fast' : days <= 10 ? 'On time' : 'Delayed');\n\nconst cellStyle: React.CSSProperties = { padding: 0, borderBottom: '1px solid #e0e0e0' };\nconst containerStyle: React.CSSProperties = { display: 'flex', alignItems: 'flex-start', gap: 48, padding: '28px 40px' };\nconst imageStyle: React.CSSProperties = { width: 110, height: 110, borderRadius: '50%', color: '#fff', display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', flexShrink: 0 };\nconst lineStyle: React.CSSProperties = { marginBottom: 14, fontSize: 17, lineHeight: 1.5, color: '#333', textAlign: 'left' };\n\nfunction RowTemplate() {\n  function gridTemplate(props: any) {\n    const name: string = props.CustomerName.trim();\n    const days: number = daysToShip(props);\n    return (\n      <tr>\n        <td className='e-order-cell' style={cellStyle}>\n          <div style={containerStyle}>\n            <div style={{ ...imageStyle, background: colorFor(props.CustomerID) }}>\n              <span style={{ fontSize: 32, fontWeight: 700, lineHeight: 1 }}>{initials(name)}</span>\n              <span style={{ fontSize: 12, opacity: 0.9, marginTop: 6 }}>#{props.OrderID}</span>\n            </div>\n            <div style={{ display: 'flex', flexDirection: 'column', minWidth: 0 }}>\n              <div style={lineStyle}>\n                <span style={{ fontWeight: 700, marginRight: 10 }}>{name}</span>\n                <span style={{ fontWeight: 300 }}>({props.CustomerID})</span>\n              </div>\n              <div style={lineStyle}>{props.ShipName}, {props.ShipAddress}</div>\n              <div style={lineStyle}>\n                <ChipListComponent chips={[props.ShipCity, props.ShipCountry, `${statusOf(days)} · ${days}d`]} cssClass='e-outline' />\n              </div>\n              <div style={{ ...lineStyle, marginTop: 4, marginBottom: 0 }}>\n                <span style={{ fontWeight: 300, fontSize: 18 }}>Freight</span>\n                <span style={{ fontSize: 32, fontWeight: 500, marginLeft: 6 }}>${Number(props.Freight).toFixed(2)}</span>\n              </div>\n            </div>\n          </div>\n        </td>\n      </tr>\n    );\n  }\n\n  return (\n    <div className='control-pane'>\n      <div className='control-section'>\n        <GridComponent dataSource={orderDetails} rowTemplate={gridTemplate} width='auto' height='460' gridLines='Horizontal'>\n          <ColumnsDirective>\n            <ColumnDirective headerText='ORDER LIST' textAlign='Center' field='CustomerName' customAttributes={{ class: 'e-order-cell' }} />\n          </ColumnsDirective>\n        </GridComponent>\n      </div>\n    </div>\n  );\n}\nexport default RowTemplate;"
    }
  ]
}