The Metabase React Embedding SDK provides pre-built components for embedding different types of Metabase content. Each component comes with multiple variants for different levels of interactivity.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/metabase/metabase/llms.txt
Use this file to discover all available pages before exploring further.
Questions
Questions (also called charts or visualizations) can be embedded in two ways:StaticQuestion
A lightweight question component that displays results without interactivity. Use this when you want to show data without letting people explore it.
- Displaying charts in dashboards or reports
- Read-only analytics views
- When you don’t need drill-through or exploration
Key props
The ID of the question to display, or
'new' for visual query builder, or 'new-native' for SQL editorHeight of the component (default: 400)
Allow users to set up alerts on this question
Pass parameter values to SQL questions in the format
{parameter_name: parameter_value}InteractiveQuestion
A fully interactive question component with drill-through, filtering, and editing capabilities. Use this when you want to allow data exploration.
- Self-service analytics
- Ad-hoc exploration
- Query builder access
- When you need full Metabase functionality
Customizing interactive questions
You can customize the layout using namespaced components:Available sub-components
BackButton
Navigate back to previous view
Filter
Filter panel component
FilterDropdown
Filter dropdown button
Summarize
Summarize panel component
SummarizeDropdown
Summarize dropdown button
Breakout
Breakout panel component
BreakoutDropdown
Breakout dropdown button
SaveButton
Save question button
QuestionVisualization
The main visualization component
Editor
Full query editor panel
EditorButton
Button to open editor
ChartTypeSelector
Chart type selection panel
ChartTypeDropdown
Chart type dropdown button
DownloadWidget
Download results widget
Title
Question title component
Creating new questions
TheInteractiveQuestion component supports creating new questions:
- Visual query builder
- SQL editor
Passing SQL parameters
For SQL questions with parameters, use theinitialSqlParameters prop:
initialSqlParameters only works with native SQL questions, not query builder questions.Enabling alerts
Allow users to set up email alerts on questions:Dashboards
Dashboards can be embedded with three levels of interactivity:StaticDashboard
A lightweight dashboard component for displaying results without interactivity.- Read-only reports
- Executive dashboards
- Public-facing analytics
InteractiveDashboard
A dashboard with drill-downs, click behaviors, and the ability to view questions.- Self-service analytics
- Data exploration
- When you need drill-through
EditableDashboard
A fully editable dashboard that allows users to modify layout, add questions, and update content.- Admin panels
- Dashboard builders
- When users need to create/modify dashboards
Dashboard props
The ID of the dashboard to display
Set initial values for dashboard filters
Show or hide the dashboard title
Allow downloading dashboard data
Array of parameter names to hide from view
Customizing dashboard height
By default, dashboards take full page height (100vh). Override with custom styles:Customizing drill-through layout
When users drill through or click on a dashboard card, customize the question view:Creating dashboards
Use theuseCreateDashboardApi hook or CreateDashboardModal component:
- Hook
- Modal component
Collections
The collection browser component allows users to navigate collections and open dashboards or questions.The browser component is only available for authenticated modular embeds (SSO), not guest embeds.
Collection props
The ID of the collection to show initially
Whether to allow editing collections
Types of entities to show:
'collection', 'dashboard', 'question', 'model'AI chat
Embed the AI chat interface (Metabot) for natural language queries.AI chat is only available for authenticated modular embeds (SSO) on Pro and Enterprise plans.
Customizing loader and error states
Provide custom components for loading and error states:Best practices
Choose the right component variant
Use static components for read-only views and interactive components when you need exploration capabilities.
Customize layouts thoughtfully
When using custom layouts with
InteractiveQuestion or drill-through customization, ensure all necessary controls are accessible.Consider permissions
Remember that UI controls don’t replace proper permissions—users can still access data through the API if they have the session token.
Next steps
Question plugins
Customize click actions on questions
Dashboard plugins
Add custom actions to dashboard cards
Theming
Customize component appearance
Authentication
Set up SSO for production