The PageMenuButton component is a component that permits to:
- show or copy an alternate version of your pages such as Markdown
- open your page in a AI chatbot
Variants
Default button
In the default button, clicking on it open a menu of actions.
Output:
Split button
In the split button, the left side permits an action while the right side opens the menu.
Output:
How it works
For each open button variant, you can pass:
- a render element to customize the output of the trigger element
- children that represents each menu item. Each menu item should be an anchor or a button that have as children:
- a svg icon
- a span element for the label
An action component to be used as trigger or menu item should accepts the hideSvg to delete the icon if true.
Page Button Props
| Prop | Description |
|---|---|
| render | A anchor or button element to render as button |
| query | The query to send to the chatbot |
| variant | The variant (default or split) |
Usage and Distribution
This component is used by default in the Hero partial.
You can install it for customization from our shadcn registry with the name @interact/PageMenuButton.