AI

AI Assistant Panel

A 420 px wide slide-over Sheet panel for embedding an AI chat assistant alongside any page content. Supports a configurable title, a scrollable content area, an optional footer slot, and both left and right anchor positions.

import { AIAssistantPanel } from "@aetherstack/blocks"

Installation

terminal
npx aether-ui add ai-assistant-panel

Import

import.tsx
import { AIAssistantPanel } from "@aetherstack/blocks"

Usage

ai-assistant-panel.tsx
"use client"

import * as React from "react"
import { AIAssistantPanel } from "@aetherstack/blocks"
import { Button } from "@aetherstack/ui"
import { PromptInput } from "@aetherstack/ui"

export function PageWithAssistant() {
  const [open, setOpen] = React.useState(false)

  return (
    <>
      <Button onClick={() => setOpen(true)}>Open AI Assistant</Button>

      <AIAssistantPanel
        open={open}
        onOpenChange={setOpen}
        title="AI Assistant"
        footer={
          <PromptInput
            value=""
            onChange={() => {}}
            onSubmit={() => {}}
            placeholder="Ask me anything…"
          />
        }
      >
        {/* render conversation thread here */}
      </AIAssistantPanel>
    </>
  )
}

Props

PropTypeDefaultDescription
openbooleanControlled open state. Omit to use uncontrolled.
onOpenChange(open: boolean) => voidCalled when the Sheet open state changes.
titlestring"AI Assistant"Heading displayed in the panel header.
childrenReactNodeScrollable body content — typically a conversation thread.
footerReactNodeFixed footer slot — typically a prompt input.
side"right" | "left""right"Which edge of the viewport the panel slides in from.
classNamestringAdditional classes on the SheetContent element.

* Required

Accessibility

  • Built on the Sheet primitive which uses role='dialog' with an aria-labelledby pointing to the panel title.
  • Focus is trapped inside the panel while it is open.
  • Pressing Escape closes the panel.
  • The close button in the header is keyboard-focusable.