@grafana/ui package

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

Classes

ClassDescription
BarGauge
BigValue
Cascader
ClickOutsideWrapper
ErrorBoundary
ErrorBoundaryAlert
Gauge
GraphThis is a react wrapper for the angular, flot based graph visualization. Rather than using this component, you should use the `<PanelRender …/> with timeseries panel configs.
GraphNG“Time as X” core component, expects ascending x
GraphSeriesToggler
JsonExplorerJsonExplorerJsonExplorer allows you to render JSON objects in HTML with a collapsible navigation.
JSONFormatter
List
ModalsProvider
Popover
PopoverController
RefreshPicker
SetInterval
StatsPicker
UnitPicker
UPlotConfigBuilder
VizRepeater

Enumerations

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

Functions

FunctionDescription
AlertingSettings({ alertmanagerDataSources, options, onOptionsChange, })
AsyncMultiSelect(props)
AsyncSelect(props)
BracesPlugin()
buildScaleKey(config)
calculateFontSize(text, width, height, lineHeight, maxSize)(BETA)
ClearPlugin()
ClipboardButton({ onClipboardCopy, onClipboardError, children, getText, icon, variant, …buttonProps })
ClipboardPlugin()
convertOldAngularValueMapping(panel)
Drawer({ children, inline, onClose, closeOnMaskClick, scrollableContent, title, subtitle, width, expandable, tabs, })
EmotionPerfTest()
EventsCanvas({ id, events, renderEventMarker, mapEventToXYCoords, config })
FadeTransition(props)
FileDropzone({ options, children, readAs, onLoad, fileListRenderer, onFileRemove })
FileDropzoneDefaultChildren({ primaryText, secondaryText, })
FileListItem({ file: customFile, removeFile })
Form({ defaultValues, onSubmit, validateOnMount, validateFieldsOnMount, children, validateOn, maxWidth, …htmlProps })
getFieldTypeIcon(field)Get the icon for a given field type
getScrollbarWidth()
getTagColor(index)
getTagColorsFromName(name)Returns tag badge background and border colors based on hashed tag name.
getTextColorForBackground(color)
IndentationPlugin()
InlineToast({ referenceElement, children, suffixIcon, placement })
measureText(text, fontSize)(BETA)
Modal(props)
MultiSelect(props)
NewlinePlugin()
Portal(props)
preparePlotFrame(frames, dimFields, timeRange)
RadioButtonGroup({ options, value, onChange, onClick, disabled, disabledOptions, size, id, className, fullWidth, autoFocus, })
RadioButtonList({ name, id, options, value, onChange, className, disabled, disabledOptions, })
resetSelectStyles(theme)
RunnerPlugin({ handler })
Segment({ options, value, onChange, Component, className, allowCustomValue, allowEmptyValue, placeholder, disabled, inputMinWidth, inputPlaceholder, onExpandedChange, autofocus, …rest })
SegmentAsync({ value, onChange, loadOptions, reloadOptionsOnChange, Component, className, allowCustomValue, allowEmptyValue, disabled, placeholder, inputMinWidth, inputPlaceholder, autofocus, onExpandedChange, noOptionMessageHandler, …rest })
SegmentInput({ value: initialValue, onChange, Component, className, placeholder, inputPlaceholder, disabled, autofocus, onExpandedChange, …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, minWidth, 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
AsyncSelectProps
BadgeProps
CardContainerProps
CardProps
CascaderOption
CompletionItem
CompletionItemGroup
ConfirmModalProps
ContextMenuProps
CustomComponentProps
CustomControlProps
DatePickerProps
DatePickerWithInputProps
DropzoneFile
ErrorBoundaryAlertPropsProps for the ErrorBoundaryAlert component
FieldArrayApi
FileDropzoneProps
FileListItemProps
GraphNGProps
GraphSeriesTogglerAPI
LoadingPlaceholderProps
MenuProps
MultiSelectCommonProps
PlotSelection
PluginSignatureBadgeProps
SelectableOptGroup
SelectAsyncProps
SelectBaseProps
SelectCommonProps
SeriesTableProps
SeriesTableRowProps
SingleStatBaseOptions
SuggestionsState
TabConfig
TableSortByFieldState
Themeable
Themeable2
TimeRangePickerProps
Token
TypeaheadInput
TypeaheadOutput
ValidationEvents
ValidationRule
VizLayoutComponentType(BETA)
VizLayoutLegendProps(BETA)
VizLayoutProps(BETA)
VizLegendItem
VizRepeaterRenderValueProps

Namespaces

NamespaceDescription
commonOptionsBuilder
DOMUtil
Modal
RadioButtonGroup
ReactUtils
styleMixins
VizLegend

Variables

VariableDescription
Alert
AutoSizeInput
Badge
Button
ButtonCascader
ButtonGroup
ButtonSelect
CallToActionCard
CardGeneric card component
CardContainer
CertificationKey
Checkbox
CodeEditor
CollapsableSection
Collapse
ColorPicker
ColorPickerInput
colors
ConfirmButton
ConfirmModal
Container
ContextMenu
ControlledCollapse
Counter
CustomScrollbarWraps component into component from react-custom-scrollbars
DataLinkInput
DataLinksContextMenu
DataLinksInlineEditor
DataSourceHttpSettings
DatePicker
DatePickerWithInput
DateTimePicker
defaultIntervals
DeleteButton
Dropdown
DropdownIndicator
EmptySearchResult
ErrorWithStack
FeatureBadge
FeatureInfoBox
Field
FieldArray
fieldMatchersUI
FieldSet
FieldValidationMessage
FileUpload
FilterInput
FilterPill
FormattedValueDisplay
FullWidthButtonContainer
getAvailableIcons
getCardStyles
getInputStyles
getLogRowStyles
getSelectStyles
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
LogMessageAnsi
LogRows
makeFragment
makeValue
Marker
Menu
mockTheme
mockThemeContext
ModalRoot
ModalsContext
ModalsController
ModalTabsHeader
Pagination
PanelContainer
PanelContextRoot
PlotLegend
PluginSignatureBadge
QueryField
RangeSliderRichHistoryQueriesTab uses this Range Component
regexValidation
SCHEMA
SecretInput
SecretTextAreaText area that does not disclose an already configured value but lets the user reset the current value and enter a new one. Typically useful for asymmetric cryptography keys.
SelectContainer
SeriesColorPicker
SeriesColorPickerPopover
SeriesColorPickerPopoverWithTheme
SeriesIcon
SeriesTable
SeriesTableRow
sharedInputStyle
Slider
sortedColors
Spinner
Switch
Tab
TabContent
Table
TableInputCSV
TabsBar
Tag
TagList
TagsInput
TextArea
ThemeContext
TimeOfDayPicker
TimeRangeInput
TimeRangePicker
TimeSeries
TimeZonePicker
TLSAuthSettings
ToolbarButton
ToolbarButtonRow
Tooltip
UPLOT_AXIS_FONT_SIZE
validate
VerticalGroup
VerticalTab
VizLayout(BETA)
VizTooltip
VizTooltipContainer
WeekStartPicker
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
ActionMeta
AlertVariant
BadgeColor
ButtonProps
ButtonVariant
CodeEditorMonacoOptions
ControlComponent
FormAPI
FormatOptionLabelMeta
FormInputSize
IconButtonVariant
IconName
IconSize
IconType
InputActionMeta
LoadOptionsCallback
Monaco
MonacoEditor
OnTagClick
PopoverContent
ReactSelectProps
Renderable
RenderFunction
ScrollbarPosition
SelectContainerProps
SelectOptions
SelectValue