How It Works
Setup
Add theDynamicUI component inside your AssistantProvider:
Placement
Header/Navbar
Always visible at the top
Floating Corner
Accessible without scrolling
Above Content
First thing users see
Sidebar
If your app has one
Button Properties
Buttons can have:| Property | Type | Description |
|---|---|---|
id | string | Unique identifier |
label | string | Display text |
icon | string | Lucide icon name (e.g., “plus”, “trash”) |
variant | string | "default", "destructive", "outline", "secondary", "ghost" |
actions | ToolAction[] | Actions to execute when clicked |
Example Buttons
Quick Add Todo
Quick Add Todo
One click to add a new item with default values
Clear Completed
Clear Completed
Batch action to archive all done items
Toggle Dark Mode
Toggle Dark Mode
Setting shortcut for theme preference
Go to Settings
Go to Settings
Navigation shortcut to settings page
User Interactions
Users manage their buttons through natural language:| Request | Result |
|---|---|
| ”Add a button to create a new project” | Creates a new shortcut button |
| ”Remove the delete button” | Removes the specified button |
| ”Change the Quick Add button to say New Item” | Updates the button label |
| ”Clear all my shortcut buttons” | Removes all buttons |
Next Steps
Approval Workflow
Require confirmation for sensitive actions