Skip to main content
Elastic UI
Elastic UI
ComponentsPatternsContentData visualization
EUI ChangelogGitHubFigma
  • Guidelines
    • Getting started
    • Accessibility
    • Writing
    • Testing
  • Theming
    • Theme provider
    • Color mode
    • High contrast mode
    • Borders
    • Breakpoints
    • Colors
    • Sizing
    • Typography
  • Templates
    • Page template
    • Sitewide search
  • Layout
    • Accordion
    • Bottom bar
    • Flex
    • Flyout
    • Header
    • Horizontal rule
    • Modal
    • Page components
    • Page header
    • Panel
    • Popover
    • Resizable container
    • Spacer
  • Navigation
    • Breadcrumbs
    • Buttons
    • Collapsible nav
    • Context menu
    • Facet
    • Key pad menu
    • Link
    • Pagination
    • Side nav
    • Steps
    • Tabs
    • Tree view
  • Display
    • Aspect ratio
    • Avatar
    • Badge
    • Callout
    • Card
    • Comment list
    • Description list
    • Drag and drop
    • Empty prompt
    • Health
    • Icons
    • Image
    • List group
    • Loading
    • Progress
    • Skeleton
    • Stat
    • Text
    • Timeline
    • Title
    • Toast
    • Tooltip
    • Tour
  • Forms
    • Form controls
    • Form layouts
    • Form validation
    • Text controls
    • Numeric controls
    • Selection controls
    • Search and filter controls
    • Date and time controls
    • Other controls
  • Tabular content
    • Tables
    • Data grid
  • Editors & Syntax
    • Code
    • Markdown
  • Utilities
    • Accessibility
    • Auto sizer
    • Beacon
    • Color palettes
    • Copy
    • CSS utility classes
    • Delay
    • Error boundary
    • Focus trap
    • Highlight and mark
    • HTML ID generator
    • I18n
    • Inner text
    • Mutation observer
    • Outside click detector
    • Overlay mask
    • Portal
    • Pretty duration
    • Provider
    • Resize observer
    • Scroll
    • Text diff
    • Text truncation
    • Window events
  • EUI
  • Display
  • Callout

Callout

EuiCallOut contains a message directly related to content on the page. This includes general information, success, warning, and error messages.

Keep these guidelines in mind:

  • Minimize the number of callouts per page.
  • Stack callouts in the order in which they require users' attention: error, warning, info, and then success.
  • Offer only one action per callout and ensure it's an action users can perform quickly.
  • If the callout has a permanent spot in the UI, but needs to be less obstructive, set the size property to s (small).
  • Use an iconType if it adds context.

Info

Use EuiCallOut to communicate general information to the user.

Loading...

Success

Use this callout to notify the user of an action that successfully completed. Use success callouts sparingly—callouts are typically used for things that are broken rather than things that succeed.

Loading...

Warning

Use this callout to warn the user against decisions they might regret. You should receive a warning message when the program detects that something is not behaving right, but it didn't cause any termination.

Loading...

Danger

Use this callout to let the user know that something went wrong. For example if you want to communicate an error. You should receive an error message when the issue is terminal, this doesn't always mean that the operation stops completely, but the task is not complete.

Loading...

Accent

Use this callout to announce new capabilities. For example if you want to highlight a feature.

Loading...

Dismissible callouts

To render a cross icon in the top right hand corner, pass an onDismiss callback that handles conditionally rendering your callout.

Loading...

Props

EuiCallOut

Extends HTMLAttributes
𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
className#
↦
Description and type
Type: string
↦
Default value
↵
Prop
aria-label#
↦
Description and type

Defines a string value that labels the current element.
@see aria-labelledby.

Type: string
↦
Default value
↵
Prop
data-test-subj#
↦
Description and type
Type: string
↦
Default value
↵
Prop
css#
↦
Description and type
Type: Interpolation<Theme>
↦
Default value
↵
Prop
title#
↦
Description and type
Type: ReactNode
↦
Default value
↵
Prop
iconType#
↦
Description and type
Type: IconType
↦
Default value
↵
Prop
color#
↦
Description and type
Type: "primary" | "accent" | "success" | "warning" | "danger"
↦
Default value
primary
↵
Prop
size#
↦
Description and type
Type: Size
↦
Default value
m
↵
Prop
heading#
↦
Description and type
Type: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p"
↦
Default value
p
↵
Prop
onDismiss#
↦
Description and type

Passing an onDismiss callback will render a cross in the top right hand corner
of the callout.

This callback fires when users click this button, which allows conditionally
removing the callout or other actions.

Type: () => void
↦
Default value
↵
Prop
ref#
↦
Description and type

Allows getting a ref to the component instance.
Once the component unmounts, React will set ref.current to null
(or call the ref with null if you passed a callback ref).
@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}

Type: LegacyRef<HTMLDivElement>
↦
Default value
↵
𐘂𐘂
Edit this page

Previous
Notification badge
Next
Card
  • Info
  • Success
  • Warning
  • Danger
  • Accent
  • Dismissible callouts
  • Props
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with ❤ by Elastic