useSidebarConfig hook to access runtime config:
Sidebar component directly:
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Access runtime config in React apps.
useSidebarConfig hook to access runtime config:
import { useSidebarConfig } from 'sidenetai-sdk';
function MyComponent() {
const config = useSidebarConfig();
return <div>Greeting: {config.text.greeting.title}</div>;
}
Sidebar component directly:
import { Sidebar } from 'sidenetai-sdk';
<Sidebar
config={{
copilotId: 'copilot-456',
auth: { ...tokens },
position: 'right',
width: '400px',
}}
onWidthChange={(width) => console.log(width)}
onAgentChange={(agentId) => console.log(agentId)}
/>