Components
Add managed call-history views or compose the SDK's presentation components.
The UI entry point provides a managed call-history list and detail panel, plus smaller components for custom layouts. Import the SDK stylesheet once; see Installation.
Managed call-history list
CallHistoryList combines query, filter, table, pagination, and CSV export behavior:
import { CallHistoryList } from "@scalereal/sr-voice-engine-react-sdk/ui";
export function CallsPanel() {
return (
<CallHistoryList
initialParams={{ page: 1, size: 20 }}
onSelectCall={(call) => console.log("Selected", call.id)}
/>
);
}Props:
initialParamsseeds the filter hook withListCallHistoryParams(includingcustom_attributesfilters).visibleFiltersselects fromsearch,status,direction, anddateRange; all are shown by default.pageSizeOptionsdefaults to[10, 20, 50].onSelectCallreceives the selectedCallHistoryrow.onExportCSVreplaces the default CSV exporter;onErrorreceives export errors.classNamestyles the outer wrapper;emptyMessagechanges the no-results text.
Call detail panel
CallDetails fetches and renders the selected call, summary, metrics, transcript, recording player, and export buttons:
import { CallDetails } from "@scalereal/sr-voice-engine-react-sdk/ui";
export function CallPanel({ callSessionId }: { callSessionId: string }) {
return <CallDetails callSessionId={callSessionId} colorScheme="auto" />;
}CallDetails accepts callSessionId, colorScheme (light, dark, or auto), optional renderAudioPlayer(callSessionId), CSV/PDF export overrides, onError, and className.
Compose a custom layout
CallHistoryTablerenders providedCallHistory[]. PassisLoading,sortField,sortDirection,onSort,onSelectCall,emptyMessage, andclassNameas needed. It does not fetch data.TranscriptViewrenders stored or realtimeTranscriptMessage[]. PassshowTimestamps,emptyMessage, andclassNameto customize it.AudioPlayerloads a recording for acallSessionId. It acceptscolorScheme,onError, andclassName.ExportButtonsacceptscallsfor CSV andcallfor PDF; omit a value to hide that action. Pass custom exporters withonExportCSVoronExportPDF, plusonErrorandclassName.StatusBadgestyles call status, direction, or sentiment text. It acceptsstatus, optional replacementchildren, andclassName.
For complete control, pair useCallHistoryFilters with useCallHistory and render CallHistoryTable yourself. See Call History.
Imports
Import components from the /ui subpath to keep UI imports explicit:
import {
AudioPlayer,
CallDetails,
CallHistoryList,
CallHistoryTable,
ExportButtons,
StatusBadge,
TranscriptView,
} from "@scalereal/sr-voice-engine-react-sdk/ui";Component imports come from the /ui entry point only — the package root is the SDK core and does not re-export components. UI components require the stylesheet import @scalereal/sr-voice-engine-react-sdk/css.
Related pages
- Call History Compose hooks, filters, and exports.
- Provider & Setup Provide query and service context.
- Realtime Render live transcript updates.
- Theming and style customization Import and configure SDK styles.