SukiAssistant

The Assistant UI component that displays the Suki Assistant interface.

import { SukiAssistant, SukiProvider } from '@suki-sdk/react';

function App() {
  return (
    <SukiProvider>
      <SukiAssistant
        // props
      />
    </SukiProvider>
  );
}

Props

PropTypeRequiredDefaultDescription
ambientOptionsAmbientOptions--Configuration options for ambient session functionality
encounterEncounter-The encounter data to pre-populate the SDK
onClose() => void--Callback function called when the SDK is closed. Only available when uiOptions.showCloseButton is not false
onNoteSubmit(data: EmitterEvents["note-submission:success"]) => void--Callback function called when a note is submitted
uiOptionsUIOptions--UI configuration options for the SDK

Type Safety

The SukiAssistant component uses conditional typing to ensure type safety based on the showCloseButton configuration:

  • When uiOptions.showCloseButton is false, the onClose prop is not available
  • When uiOptions.showCloseButton is true or undefined, the onClose prop is optional