AskAI.Trigger

Trigger control that toggles AskAI open state using the default Peam button or custom content

Overview

Button-like trigger that toggles the open state for AskAI.Dialog, AskAI.Chat, or AskAI.Sidepane. Use the default floating Peam button or pass custom content (including asChild) to integrate with your UI.

Demo

Usage

import { AskAI } from 'peam/client';

export default function Page() {
  return (
    <AskAI>
      <AskAI.Trigger inlineButton />
      <AskAI.Dialog />
    </AskAI>
  );
}

Props

PropTypeDefaultDescription
asChildbooleanfalseUse a custom element via Radix Slot.
childrenReactNodeundefinedCustom trigger contents.
inlineButtonbooleanfalseRenders the default button without fixed positioning.
variant'icon' | 'iconLabel''iconLabel'Default Peam button style.

On this page

GitHubEdit this page on GitHub