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
      • Guidelines
    • 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
  • Toast

Toast

Be sure to read the full

toast usage guidelines.

Toast list

Loading...

Default

EuiToast allows for small notes that appear in the bottom right of the screen. They should be used for ephemeral, live actions (think save complete or something just finished right now).

They should not be used for historical actions (your report built 30 minutes ago). This means that a user should never be greeted with toasts when starting a session. Toasts should be brief and avoid long paragraphs of text or titling.

Loading...

Info

For informative messages use

type="info".

Loading...

Success

For success messages use color="success".

Loading...

Warning

Use this callout to warn the user against decisions they might regret. Show a warning message when the program detects that something is not behaving right, but it didn't cause any termination. For warning messages use color="warning".

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 show an error message when the issue is terminal, this doesn't always mean that the operation stops completely, but the task is not complete. For errors messages use color="danger".

Loading...

Props

EuiToast

Extends HTMLAttributes
𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
title#
↦
Description and type
Type: ReactNode
↦
Default value
↵
Prop
color#
↦
Description and type
Type: "primary" | "success" | "warning" | "danger"
↦
Default value
↵
Prop
iconType#
↦
Description and type
Type: IconType
↦
Default value
↵
Prop
onClose#
↦
Description and type
Type: () => void
↦
Default value
↵
Prop
className#
↦
Description and type
Type: string
↦
Default value
↵
Prop
aria-label#
↦
Description and type
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
↵
𐘂𐘂

EuiGlobalToastList

𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
dismissToast#
↦
Description and type
Type: (toast: Toast) => void
↦
Default value
Required
↵
Prop
toastLifeTimeMs#
↦
Description and type
Type: number
↦
Default value
Required
↵
Prop
toasts#
↦
Description and type
Type: Toast[]
↦
Default value
[]
↵
Prop
side#
↦
Description and type

Determines which side of the browser window the toasts should appear

Type: ToastSide
↦
Default value
right
↵
Prop
showClearAllButtonAt#
↦
Description and type

At this threshold, a "Clear all" button will display at the bottom of the toast list
that allows users to dismiss all toasts in a single click.

Defaults to 3. Set to 0 to disable the button entirely.

Type: number
↦
Default value
3
↵
Prop
onClearAllToasts#
↦
Description and type

Optional callback that fires when a user clicks the "Clear all" button.

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

Defaults to the log role.

The alert role
can be considered only if all toasts in this list will require immediate user attention.
Several alerts at once, and unnecessary alerts, will a create bad screen reader user experience.

Type: AriaRole
↦
Default value
log
↵
Prop
className#
↦
Description and type
Type: string
↦
Default value
↵
Prop
aria-label#
↦
Description and type
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
↵
𐘂𐘂

EuiGlobalToastListItem

𐘂𐘂
✄𐘗✄𐘗
Prop
↦
Description and type
↦
Default value
↵
Prop
isDismissed#
↦
Description and type
Type: boolean
↦
Default value
↵
Prop
children#
↦
Description and type

ReactElement to render as this component's content

Type: ReactElement<any, string | JSXElementConstructor<any>>
↦
Default value
↵
Prop
className#
↦
Description and type
Type: string
↦
Default value
↵
Prop
aria-label#
↦
Description and type
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
↵
𐘂𐘂
Edit this page

Previous
Title
Next
Guidelines
  • Toast list
  • Default
  • Info
  • Success
  • Warning
  • Danger
  • Props
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with ❤ by Elastic