Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source RSS

@grafana/ui package

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

Classes

ClassDescription
BarGauge
BigValue
Cascader
ClickOutsideWrapper
ClipboardButton
ErrorBoundary
ErrorBoundaryAlert
Gauge
Graph
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
LogMessageAnsi
ModalsProvider
Popover
PopoverController
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
NodeGraphDataFrameFieldNames
SeriesVisibilityChangeBehavior

Functions

FunctionDescription
AlertingSettings({ alertmanagerDataSources, options, onOptionsChange, })
AsyncMultiSelect(props)
AsyncSelect(props)
BracesPlugin()
buildScaleKey(config)
calculateFontSize(text, width, height, lineHeight, maxSize)(BETA)
ClearPlugin()
ClipboardPlugin()
convertOldAngularValueMapping(panel)
EmotionPerfTest()
EventsCanvas({ id, events, renderEventMarker, mapEventToXYCoords, config })
FadeTransition(props)
FileDropzone({ options, children, readAs, onLoad, fileListRenderer })
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()
measureText(text, fontSize)(BETA)
Modal(props)
MultiSelect(props)
NewlinePlugin()
Portal(props)
preparePlotFrame(frames, dimFields)
RadioButtonGroup({ options, value, onChange, disabled, disabledOptions, size, className, fullWidth, autoFocus, })
resetSelectStyles()
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
BadgeProps
CardContainerProps
CardProps
CascaderOption
CompletionItem
CompletionItemGroup
ConfirmModalProps
ContextMenuProps
CustomControlProps
DatePickerProps
DatePickerWithInputProps
DropzoneFile
ErrorBoundaryAlertPropsProps for the ErrorBoundaryAlert component
FieldArrayApi
FileDropzoneProps
FileListItemProps
GraphNGProps
GraphSeriesTogglerAPI
LoadingPlaceholderProps
MultiSelectCommonProps
PlotSelection
PluginSignatureBadgeProps
SelectableOptGroup
SelectAsyncProps
SelectBaseProps
SelectCommonProps
SelectContainerProps
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
Badge
Button
ButtonCascader
ButtonGroup
ButtonSelect
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
DatePicker
DatePickerWithInput
DateTimePicker
defaultIntervals
DeleteButton
Drawer
DropdownIndicator
EmptySearchResult
ErrorWithStack
FeatureBadge
FeatureInfoBox
Field
FieldArray
fieldMatchersUI
FieldSet
FieldValidationMessage
FileUpload
FilterInput
FilterPill
FormattedValueDisplay
FullWidthButtonContainer
getAvailableIcons
getCardStyles
getFormStyles
getInputStyles
getLogRowStyles
getSelectStyles
getStandardFieldConfigsReturns collection of common field config properties 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
SelectContainer
selectOptionInTest
SeriesColorPicker
SeriesColorPickerPopover
SeriesColorPickerPopoverWithTheme
SeriesIcon
SeriesTable
SeriesTableRow
sharedInputStyle
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
UPLOT_AXIS_FONT_SIZE
validate
VerticalGroup
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
FormInputSize
IconButtonVariant
IconName
IconSize
IconType
InputActionMeta
Monaco
MonacoEditor
OnTagClick
PopoverContent
Renderable
RenderFunction
ScrollbarPosition
SelectOptions
SelectValue