TheDocumentation 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.
StaticQuestion component renders a lightweight, read-only question visualization. It’s ideal for displaying data without allowing users to edit the underlying query.
Basic usage
With custom dimensions
Using entity ID
You can reference questions by their entity ID:Using signed embed token
For guest embed scenarios, use a signed token:When using a
token, the questionId prop becomes optional.Composing with sub-components
Build custom layouts using sub-components:With filters
Allow users to filter the data without editing the query:With SQL parameters
Provide initial values for SQL template tags:Hiding parameters
Hide specific parameters from the UI:With custom title
With chart type selector
Allow users to switch between visualization types:Disable downloads
Available sub-components
Complete example
Props
The ID of the question. Can be:
- Numerical ID (e.g.,
1) - Entity ID string (e.g.,
"abc123")
token.Signed token for guest embed. When provided,
questionId becomes optional.Height of the component (e.g.,
400 or "100%").Width of the component.
Custom CSS styles.
Custom CSS class name.
Whether to show the chart type selector.
Whether to enable download functionality.
Whether to enable alerts functionality.
Initial values for SQL template tags.
List of parameter names to hide from the UI.
Custom title to display instead of the question’s title.
Custom layout using sub-components.
Sub-components reference
StaticQuestion.Filter
Filter controls for the question.StaticQuestion.FilterDropdown
Dropdown menu for filter controls.StaticQuestion.ResetButton
Button to reset filters.StaticQuestion.Title
Question title display.StaticQuestion.Summarize
Summarization controls.StaticQuestion.SummarizeDropdown
Dropdown menu for summarization.StaticQuestion.QuestionVisualization
The main visualization display.StaticQuestion.ChartTypeSelector
Selector for changing the chart type.StaticQuestion.ChartTypeDropdown
Dropdown menu for chart types.StaticQuestion.QuestionSettings
Question settings controls.StaticQuestion.QuestionSettingsDropdown
Dropdown menu for question settings.StaticQuestion.Breakout
Breakout/group by controls.StaticQuestion.BreakoutDropdown
Dropdown menu for breakout options.StaticQuestion.DownloadWidget
Download controls.StaticQuestion.DownloadWidgetDropdown
Dropdown menu for download options.StaticQuestion.AlertsButton
Button to manage question alerts.StaticQuestion.SqlParametersList
List of SQL template tag parameters.TypeScript types
When to use StaticQuestion vs InteractiveQuestion
UseStaticQuestion when:
- You want to display data without allowing query editing
- You need a lightweight, read-only visualization
- Users should only be able to filter pre-defined parameters
- You’re embedding in a dashboard-like layout
InteractiveQuestion when:
- Users need to explore and modify queries
- You want to enable drill-through actions
- Users should be able to save modified questions
- You need full query builder functionality
Related
- InteractiveQuestion - Interactive question component
- Custom styling - Styling questions
- Event handlers - Working with events