@findable-ai/react

Drop-in React components and headless hooks for building Findable-powered UIs. Includes the @findable-ai/sdk as a dependency.

Installation

npm install @findable-ai/react

Quick Start

import { FindableProvider, FindableChat, FindableSearch } from '@findable-ai/react';
import '@findable-ai/react/styles.css';

// Exchange your API key for a session token server-side
// See: /api/authentication#session-tokens
function App({ sessionToken }: { sessionToken: string }) {
  return (
    <FindableProvider token={sessionToken} buildingOwnerId="YOUR_OWNER_ID">
      <FindableChat buildingId="bld-789" />
      <FindableSearch buildingId="bld-789" />
    </FindableProvider>
  );
}

Components

ComponentDescription
FindableProviderContext provider — wraps your app
FindableChatComplete AI chat widget with streaming
FindableSearchDocument search with results list

Headless Hooks

For full UI control, use the headless hooks directly:

HookDescription
useChat(options)Chat state, streaming, and message management
useSearch(options)Search with debounce and pagination