chat_drawer
chat_drawer(*content, title=None, width=400, open=True, resizable=True)Configure content displayed adjacent to a chat interface.
A drawer can show a preview, generated report, or detail view beside the conversation. Pass this configuration to chat_ui(drawer=) or page_chat(drawer=) for its initial content and layout, then update it through the chat drawer controller.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| *content | TagChild | Initial HTML children for the drawer panel. | () |
| title | str | None | Optional accessible and visible title for the drawer panel. | None |
| width | 'CssUnit' | Initial drawer width. A positive number is interpreted as pixels; a string may use any valid CSS width. | 400 |
| open | bool | Whether the drawer is initially visible. | True |
| resizable | bool | Whether the drawer can be resized on desktop. | True |
Returns
| Name | Type | Description |
|---|---|---|
| ChatDrawer | A drawer configuration for page_chat(drawer=) or chat_ui(drawer=). |
Examples
from shiny import ui
from shinychat import chat_drawer
drawer = chat_drawer(
ui.p("No result selected."),
title="Result",
width=480,
)See Also
: Create a page with a drawer. : Create an embedded chat with a drawer. : Update the panel from the server.