API Reference
Complete API documentation for the @inappai/react package.
Quick Links
- Components - InAppAI component props
- Types - TypeScript type definitions
- Styling - CustomStyles API
- Hooks - useTools and useToolRegistry
Package Overview
import {
// Component
InAppAI,
// Types
Message,
Tool,
CustomStyles,
InAppAIProps,
// Hooks
useTools,
useToolRegistry,
ToolRegistryProvider,
} from '@inappai/react';
// Don't forget styles
import '@inappai/react/styles.css';
Basic Usage
import { useState } from 'react';
import { InAppAI, Message } from '@inappai/react';
import '@inappai/react/styles.css';
function App() {
const [messages, setMessages] = useState<Message[]>([]);
return (
<InAppAI
agentId="your-agent-id"
messages={messages}
onMessagesChange={setMessages}
/>
);
}
What’s in This Section
Components
Complete documentation for the <InAppAI /> component including all props, display modes, and configuration options.
Types
TypeScript type definitions for Message, Tool, CustomStyles, and other interfaces.
Styling
Complete reference for the customStyles prop with all available styling options.
Hooks
Documentation for useTools and useToolRegistry hooks for advanced tool management.