@grafana/ui package

A library containing the different design components of the Grafana ecosystem.

Classes

ClassDescription
ansicolorRepresents an ANSI-escaped string.
BarGauge
BigValue
Cascader
ClickOutsideWrapper
ClipboardButton
ErrorBoundary
ErrorBoundaryAlert
Gauge
Graph
GraphNG“Time as X” core component, expectes ascending x
GraphSeriesToggler
JsonExplorerJsonExplorerJsonExplorer allows you to render JSON objects in HTML with a collapsible navigation.
JSONFormatter
List
LogMessageAnsi
ModalsProvider
Popover
PopoverController
Portal
QueryFieldRenders an editor field. Pass initial value as initialQuery and listen to changes in props.onValueChanged. This component can only process strings. Internally it uses Slate Value. Implement props.onTypeahead to use suggestions, see PromQueryField.tsx as an example.
RefreshPicker
SelectValueEditor
SetInterval
StatsPicker
StringArrayEditor
UnitPicker
UPlotConfigBuilder
VizRepeater

Enumerations

EnumerationDescription
BarGaugeDisplayMode
BigValueColorMode
BigValueGraphMode
BigValueJustifyMode
BigValueTextModeOptions for how the value & title are to be displayed
CompletionItemKind
EventsWithValidation
LegacyInputStatus
LegendDisplayMode
NodeGraphDataFrameFieldNames
SeriesVisibilityChangeBehavior
TableCellDisplayMode
TooltipDisplayMode

Functions

FunctionDescription
AsyncMultiSelect(props)
AsyncSelect(props)
BracesPlugin()
calculateFontSize(text, width, height, lineHeight, maxSize)(BETA)
ClearPlugin()
ClipboardPlugin()
convertOldAngularValueMapping(panel)
EmotionPerfTest()
EventsCanvas({ id, events, renderEventMarker, mapEventToXYCoords, config })
FadeTransition(props)
Form({ defaultValues, onSubmit, validateOnMount, validateFieldsOnMount, children, validateOn, maxWidth, …htmlProps })
getScrollbarWidth()
getTagColor(index)
getTagColorsFromName(name)Returns tag badge background and border colors based on hashed tag name.
getTextColorForBackground(color)
IndentationPlugin()
measureText(text, fontSize)(BETA)
Modal(props)
MultiSelect(props)
NewlinePlugin()
preparePlotFrame(frames, dimFields)
RadioButtonGroup({ options, value, onChange, disabled, disabledOptions, size, className, fullWidth, })
renderOrCallToRender(itemToRender, props)Given react node or function returns element accordingly
resetSelectStyles()
RunnerPlugin({ handler })
Segment({ options, value, onChange, Component, className, allowCustomValue, placeholder, disabled, …rest })
SegmentAsync({ value, onChange, loadOptions, Component, className, allowCustomValue, disabled, placeholder, noOptionMessageHandler, …rest })
SegmentInput({ value: initialValue, onChange, Component, className, placeholder, disabled, autofocus, …rest })
Select(props)
SelectionShortcutsPlugin()
sharedSingleStatMigrationHandler(panel)
sharedSingleStatPanelChangedHandler(panel, prevPluginId, prevOptions)
SlatePrism(optsParam, prismLanguages)A Slate plugin to highlight code syntax.
SlideOutTransition(props)
stylesFactory(stylesCreator)
SuggestionsPlugin({ onTypeahead, cleanText, onWillApplySuggestion, portalOrigin, })
TabbedContainer(props)
useStyles(getStyles)
useStyles2(getStyles)
useTheme()
useTheme2()
ValuePicker({ label, icon, options, onChange, variant, size, isFullWidth, menuPlacement, })
VizLegend({ items, displayMode, sortBy: sortKey, seriesVisibilityChangeBehavior, sortDesc, onLabelClick, onToggleSort, placement, className, itemRenderer, readonly, })
withErrorBoundary(Component, errorBoundaryProps)HOC for wrapping a component in an error boundary.

Interfaces

InterfaceDescription
BadgeProps
CardContainerProps
CardProps
CascaderOption
CompletionItem
CompletionItemGroup
ConfirmModalProps
ContextMenuProps
ErrorBoundaryAlertPropsProps for the ErrorBoundaryAlert component
FieldArrayApi
GraphNGProps
GraphSeriesTogglerAPI
LoadingPlaceholderProps
OptionsWithLegend
OptionsWithTextFormatting
OptionsWithTooltip
PluginSignatureBadgeProps
SeriesTableProps
SeriesTableRowProps
SingleStatBaseOptions
SuggestionsState
TabConfig
TableSortByFieldState
Themeable
Themeable2
Token
TypeaheadInput
TypeaheadOutput
ValidationEvents
ValidationRule
VizLayoutComponentType(BETA)
VizLayoutLegendProps(BETA)
VizLayoutProps(BETA)
VizLegendItem
VizLegendOptions
VizRepeaterRenderValueProps
VizTextDisplayOptionsExplicit control for visualization text settings

Namespaces

NamespaceDescription
commonOptionsBuilder
DOMUtil
Modal
RadioButtonGroup
styleMixins
VizLegend

Variables

VariableDescription
Alert
AlphaNotice
Badge
Button
ButtonCascader
ButtonGroup
CallToActionCard
CardGeneric card component
CardContainer
CertificationKey
Checkbox
CodeEditor
CollapsableSection
Collapse
ColorPicker
colors
ConfirmButton
ConfirmModal
Container
ContextMenu
ControlledCollapse
Counter
CustomScrollbarWraps component into component from react-custom-scrollbars
DataLinkInput
DataLinksContextMenu
DataLinksInlineEditor
DataSourceHttpSettings
defaultIntervals
DeleteButton
Drawer
EmptySearchResult
ErrorWithStack
FeatureBadge
FeatureInfoBox
Field
FieldArray
fieldMatchersUI
FieldSet
FieldValidationMessage
FileUpload
FilterPill
FormattedValueDisplay
FullWidthButtonContainer
getAvailableIcons
getCardStyles
getFormStyles
getLogRowStyles
getStandardFieldConfigsReturns collection of common field config properties definitions
getStandardOptionEditorsReturns collection of standard option editors definitions
getTheme
graphTickFormatter
graphTimeFormat
GraphWithLegend
hasValidationEvent
HorizontalGroup
Icon
IconButton
InfoBox
InlineField
InlineFieldRow
InlineFormLabel
InlineLabel
InlineSegmentGroup(BETA)
InlineSwitch
Input
InputControl
Label
LegacyForms
Legend
LinkButton
linkModelToContextMenuItemsDelays creating links until we need to open the ContextMenu
LoadingPlaceholder
LogLabels
LogRows
makeFragment
makeValue
Marker
mockTheme
mockThemeContext
ModalRoot
ModalsController
ModalTabsHeader
NumberValueEditor
Pagination
PanelContextRoot
PlotLegend
PluginSignatureBadge
RangeSliderRichHistoryQueriesTab uses this Range Component
regexValidation
SCHEMA
SeriesColorPicker
SeriesColorPickerPopover
SeriesColorPickerPopoverWithTheme
SeriesIcon
SeriesTable
SeriesTableRow
Slider
SliderValueEditor
sortedColors
Spinner
StringValueEditor
Switch
Tab
TabContent
Table
TableInputCSV
TabsBar
Tag
TagList
TagsInput
TextArea
ThemeContext
TimeOfDayPicker
TimeRangeInput
TimeRangePicker
TimeSeries
TimeZonePicker
TLSAuthSettings
ToolbarButton
ToolbarButtonRow
Tooltip
usePlotContext
validate
VerticalGroup
VizLayout(BETA)
VizTooltip
VizTooltipContainer
WithContextMenu
withTheme
XYCanvasRenders absolutely positioned element on top of the uPlot’s plotting area (axes are not included!). Useful when you want to render some overlay with canvas-independent elements on top of the plot.

Type Aliases

Type AliasDescription
AlertVariant
BadgeColor
ButtonVariant
FormAPI
FormInputSize
IconName
IconSize
IconType
LegendPlacement
Monaco
MonacoEditor
OnTagClick
PopoverContent
Renderable
RenderFunction
ScrollbarPosition
VizTooltipOptions