Aller au contenu
← Documentation

React SDK

Composants React prêts à l'emploi

Installation

npm install @luneo/react

ProductCustomizer

import { ProductCustomizer } from '@luneo/react';

export default function CustomizePage() {
  return (
    <ProductCustomizer
      productId="prod_xxx"
      productImage="/tshirt.png"
      productName="T-Shirt"
      onSave={(design) => logger.info('Saved:', design)}
    />
  );
}

ProductConfigurator3D

import { ProductConfigurator3D } from '@luneo/react';

export default function Configure3DPage() {
  return (
    <ProductConfigurator3D
      productId="prod_xxx"
      modelUrl="/models/chair.glb"
      onExportAR={(url) => logger.info('AR:', url)}
    />
  );
}

VirtualTryOn

import { VirtualTryOnComponent } from '@luneo/react';

export default function TryOnPage() {
  return (
    <VirtualTryOnComponent
      category="glasses"
      modelUrl="/models/sunglasses.glb"
      onCapture={(screenshot) => logger.info('Screenshot:', screenshot)}
    />
  );
}