KProductItemData Interface
The data shape expected by e-commerce block components such as KEcommerceProductList. Each item must have at minimum an id and title; all other fields are optional.
Return rows matching this shape from your data provider to power e-commerce block components.
import type { KProductItemData } from '@katlux/providers'
const products: KProductItemData[] = [
{
id: 1,
title: 'Wireless Headphones',
image: '/images/headphones.jpg',
price: 149.99,
currency: 'USD',
description: 'Premium noise-cancelling wireless headphones.',
// Any extra fields are also accepted
sku: 'WH-001',
stock: 24
},
{
id: 2,
title: 'Mechanical Keyboard',
price: 89.99,
currency: 'EUR'
}
]| Property | Type | Required | Description |
|---|
| id | string | number | ✓ | Unique product identifier. |
| title | string | ✓ | Display name shown in the product card. |
| image | string | — | URL or path to the product image. |
| price | number | — | Numeric price value. Display formatting is handled by the component. |
| currency | string | — | ISO 4217 currency code (e.g. 'USD', 'EUR'). |
| description | string | — | Short descriptive text displayed below the product title. |
| [key: string] | any | — | Any additional fields are forwarded to action callbacks and are accessible in custom slot templates. |