Eidetic

AI Info Panel

AI
Trust

Unified component for displaying AI rationale, detailed explanations, and active context. Supports tooltip, panel, and inline display modes with content organized by rationale items, reasoning steps, or context awareness.

Rationale — Panel

Expandable panel showing why AI gave a specific answer

Reasoning

Pattern matching

Your query matched several known patterns in medical literature about symptom combinations.

Source

WHO Guidelines 2024

Referenced section 4.2 on diagnostic criteria for seasonal allergies.

View source
Assumption

Location-based

Assumed temperate climate based on your profile location setting.

Limitation

Not a diagnosis

This analysis is informational only and should not replace professional medical advice.

AI-generated analysis

Rationale — Tooltip

Hover over trigger to see rationale

Seasonal allergies are most common in spring

Explanation — Panel

Step-by-step reasoning with alternatives and details

1

Analyzed user query for intent

Identified product comparison request with budget constraint

92%
NLP modelQuery history
2

Retrieved matching products from catalog

47 products matched within the specified budget range

88%
Product DBPricing API
3

Applied ranking algorithm

Weighted by reviews (40%), price (30%), and features (30%)

85%
4

Generated personalized recommendations

Top 3 products selected based on user preference history

78%
User profilePurchase history
AI-generated analysis

Explanation — Collapsed

Compact state showing summary

Context — Panel

Active context and capabilities overview

Active Context4 items
quarterly-report.pdf2.4 MB
dataset-analysis.csv890 KB
docs.example.com/api15 KB
Previous conversation context
Capabilities
Text Generation
Code Analysis
Web Search
Image Analysis
File Upload
Voice Input
AI-generated analysis

Context — Inline

Lightweight inline context display

Active Context
Active Context4 items
quarterly-report.pdf2.4 MB
dataset-analysis.csv890 KB
docs.example.com/api15 KB
Previous conversation context
Capabilities
Text Generation
Code Analysis
Web Search
Image Analysis
File Upload
Voice Input

Props

AIInfoPanel component API reference

PropTypeDefaultDescription
mode*'rationale' | 'explanation' | 'context'Content mode — determines data model and layout
display'tooltip' | 'panel' | 'inline''panel'How the component is displayed
trigger'hover' | 'click' | 'always''always'Trigger mode for tooltip display
titlestringOverride the default title (auto-generated per mode)
position'top' | 'bottom' | 'left' | 'right''top'Tooltip position relative to trigger
maxWidthnumber320Maximum width for tooltip display
defaultExpandedbooleanfalseWhether the panel starts expanded
showCopyButtonbooleantrueShow copy to clipboard button (rationale/explanation only)
exportablebooleanfalseShow JSON export button
itemsInfoItem[]Rationale items (for mode="rationale")
reasoningReasoningStep[]Reasoning steps (for mode="explanation")
alternativesAlternative[]Alternative options (for mode="explanation")
assumptionsstring[]Assumptions made (for mode="explanation")
limitationsstring[]Known limitations (for mode="explanation")
contextItemsContextItem[]Context items (for mode="context")
capabilitiesContextCapability[]AI capabilities (for mode="context")
onReportIssue() => voidCallback for reporting an issue

Type Interfaces

Data models for each mode

// Rationale items
type InfoCategory = 'reasoning' | 'source' | 'context' | 'assumption' | 'limitation'
interface InfoItem {
category: InfoCategory
label: string
content: string
details?: string
confidence?: number
sourceUrl?: string
icon?: LucideIcon
}
// Explanation reasoning
interface ReasoningStep {
step: string
label?: string
keyFindings?: string
confidence?: number
dataSources?: string[]
}
interface Alternative {
option: string
confidence?: number
predictedOutcome?: string
}
// Context items
type ContextItemType = 'file' | 'url' | 'memory'
interface ContextItem {
type: ContextItemType
name: string
size?: string
icon?: LucideIcon
}
interface ContextCapability {
name: string
enabled: boolean
icon?: LucideIcon
}

Usage

Import and basic examples

import { AIInfoPanel } from '@/blocks/ai-transparency/ai-info-panel'
// Rationale tooltip
<AIInfoPanel
mode="rationale"
display="tooltip"
trigger="hover"
items={[
{ category: 'reasoning', label: 'Pattern match', content: 'Matched known patterns' },
{ category: 'source', label: 'WHO 2024', content: 'Section 4.2', sourceUrl: '#' },
]}
>
<span className="underline">Why this answer?</span>
</AIInfoPanel>
// Explanation panel
<AIInfoPanel
mode="explanation"
reasoning={steps}
alternatives={alts}
assumptions={['User prefers quality over price']}
defaultExpanded
exportable
/>
// Context awareness
<AIInfoPanel
mode="context"
contextItems={[{ type: 'file', name: 'report.pdf', size: '2.4 MB' }]}
capabilities={[{ name: 'Code Analysis', enabled: true }]}
/>

Built With

1 component

This block uses the following UI components from the design system:

Button

Consolidation Note

Which blocks this replaces

Unified Component

This component consolidates three previously separate blocks:

  • AI Rationale Tooltip — now mode="rationale" with display="tooltip"
  • Explanation Panel — now mode="explanation"
  • AI Context Panel — now mode="context"

Features

Built-in functionality

Accessibility

Accessibility considerations

ARIA Attributes

Panel expansion state conveyed via aria-expandedTab selection communicated to screen readersCopy success state announced via icon change

Keyboard Navigation

KeyAction
TabNavigate between interactive elements
Enter / SpaceToggle panel expansion and activate buttons
EscapeClose tooltip (click mode)

Notes

  • Tooltip uses fixed positioning to avoid layout shifts
  • Categories use icons and text labels for colorblind accessibility
  • Outside click detection closes tooltip in click mode

Related Components

AI Status IndicatorAI CaveatSource CitationAI Streaming Text