Skip to main content

React Widget Component Library

Out-of-the-box Digital Employee UI components, build a complete interactive interface in 5 minutes.

Why Choose Widget?​

Out-of-the-box​

No need to design UI from scratch, combine components like building blocks:

import {PilotKit, ConversationList, Subtitle, ControlPanel} from '@bdky/aaas-pilot-kit-react-widget';
import '@bdky/aaas-pilot-kit-react-widget/styles.css';

function App() {
return (
<PilotKit token="xxx" figureId="xxx" ttsPer="xxx">
<ConversationList />
<Subtitle />
<ControlPanel />
</PilotKit>
);
}

Auto-adaptive​

PC and mobile auto-switch layouts, no additional code needed. All components support variant property:

  • auto: Automatically detect device type (default)
  • mobile: Force mobile styles
  • desktop: Force desktop styles

Customizable (when you need)​

Each component supports style overriding and custom rendering, won't be limited by "encapsulation":

// Custom rendering
<Subtitle>
{({speakerName, fullText}) => (
<div className="my-subtitle">
<span>{speakerName}</span>
<p>{fullText}</p>
</div>
)}
</Subtitle>

Widget vs SDK​

SDK refers to @bdky/aaas-pilot-kit-react, providing underlying Hooks and event capabilities, requiring you to implement UI yourself.

ScenarioRecommended Solution
Quick launch, low UI requirementsWidget
Need completely custom UI designReact SDK
80% default + 20% fine-tuningWidget + Style customization
Deep integration into existing design systemReact SDK
Not sure? Try Widget first

If you encounter limitations, it's easy to switch to SDK - they share the same underlying APIs. The Hooks and events used internally by Widget come from @bdky/aaas-pilot-kit-react.

Component Overview​

Core Container​

ComponentPurpose
PilotKitCore container, integrates Provider + Digital Human rendering

Message Display​

ComponentPurpose
ConversationListMessage history list
ConversationSingle message
SubtitleReal-time subtitle

Interactive Control​

ComponentPurpose
ControlPanelVoice/text input control panel
InputIndependent text input box
RecommendedQuestionsRecommended question list

Overlay​

ComponentPurpose
StartupScreenStartup guide page (iOS manual activation)
LoadingOverlayLoading state
StatusOverlayGeneric status prompt (busy, timeout, etc.)

Layout Helpers​

ComponentPurpose
LayoutFlex layout container
FillAdapterAdaptive fill space

Development Tools​

ComponentPurpose
DebugPanelDebug panel, displays events and states

Next Steps​

Technical Support​