> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sidenet.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# React - Advanced

> Access runtime config in React apps.

For React apps, use the `useSidebarConfig` hook to access runtime config:

```typescript theme={null}
import { useSidebarConfig } from 'sidenetai-sdk';

function MyComponent() {
  const config = useSidebarConfig();
  return <div>Greeting: {config.text.greeting.title}</div>;
}
```

For full control, use the `Sidebar` component directly:

```typescript theme={null}
import { Sidebar } from 'sidenetai-sdk';

<Sidebar
  config={{
    position: 'right',
    width: '400px',
    userId: 'user-123',
    copilotId: 'copilot-456',
  }}
  onWidthChange={(width) => console.log(width)}
  onAgentChange={(agentId) => console.log(agentId)}
/>
```

## License

MIT
