Search documentation

Search documentation

Component@pillar-ai/react

PillarProvider

typescript
import { PillarProvider } from '@pillar-ai/react'

Signature

typescript
function PillarProvider(props: PillarProviderProps): JSX.Element

Props

Props

productKey
string
Your product key from the Pillar app. Get it at app.trypillar.com
config
Omit<PillarConfig, "productKey" | "helpCenter">
Additional SDK configuration Notable options: - `panel.useShadowDOM`: Whether to isolate styles in Shadow DOM (default: false). Set to false to let custom cards inherit your app's CSS (Tailwind, etc.)
onTask
(task: TaskExecutePayload) => void
Handler called when a task action is triggered from the chat. Use this to handle AI-suggested actions like opening modals, navigating, etc.
cards
Record<string, CardComponent>
Custom card components to render for inline_ui type actions. Map card type names to React components that will render the inline UI.
domScanning
boolean
Enable DOM scanning to send page context with messages. When enabled, interactable elements and text content are captured and sent to the LLM.Defaults to false.
children
requiredReactNode
Enable DOM scanning dev mode to preview the scanned page before sending. Shows a modal with the AST tree visualization before each message is sent. Useful for debugging what context will be sent to the LLM. /** Children components

Deprecated

helpCenter
string
Deprecated.

Related Types

Source: packages/sdk-react/src/PillarProvider.tsx