diff --git a/.changeset/rich-lizards-rule.md b/.changeset/rich-lizards-rule.md new file mode 100644 index 000000000..111d4cd08 --- /dev/null +++ b/.changeset/rich-lizards-rule.md @@ -0,0 +1,5 @@ +--- +"@assistant-ui/react": patch +--- + +feat: AssistantModalPrimitive diff --git a/apps/www/pages/reference/primitives/AssistantModal.mdx b/apps/www/pages/reference/primitives/AssistantModal.mdx new file mode 100644 index 000000000..8fb9b3017 --- /dev/null +++ b/apps/www/pages/reference/primitives/AssistantModal.mdx @@ -0,0 +1,119 @@ +--- +title: AssistantModalPrimitive +description: A modal chat UI usually displayed in the bottom right corner of the screen. +--- + +import { Code } from "@radix-ui/themes"; +import { ParametersTable, DataAttributesTable } from "@/components/docs"; + +## Anatomy + +```tsx +import { AssistantModalPrimitive } from "@assistant-ui/react"; + +const Thread = () => ( + + + + + + + + +); +``` + +## API Reference + +### Root + +Contains all parts of the assistant modal. + + void", + description: "Event handler called when the open state of the assistant modal changes.", + }, + { + name: "modal", + type: "boolean", + default: "false", + description: "The modality of the assistant modal. When set to true, interaction with outside elements will be disabled and only modal content will be visible to screen readers." + } + ]} +/> + +### Trigger + +A button that toggles the open state of the assistant modal. `AssistantModalPrimitive.Content` will position itself against this button. + +This primitive renders a `