BridgeBeta
  • Brand
  • Digital Assets
    Foundations
    Icons
    Components
    Templates
  • Resources
    Design Tokens
    How-tos
    Best Practices
    Libraries
    Accessibility
    Products List
  • Support
    • Overview
    • Actions
      • Overview
      • Button
      • ContextMenu
      • Link
    • Controls
      • Overview
      • Checkbox
      • Tag
      • Toggle
    • Forms
      • Overview
      • DatePicker
      • FileUploader
      • Input
      • NumberInput
      • RadioButton
      • Search
      • Select
      • Slider
      • TextArea
      • TextInput
    • Hooks
      • useIsomorphicLayoutEffect
      • useMediaQuery
      • useSettings
    • Navigation
      • Overview
      • AnchorNavigation
      • BannerNavigation
      • Breadcrumb
      • Footer
      • InfoBar
      • MainNavigation
      • SecondaryNavigation
      • StepNavigation
      • SubNavigation
    • Overlay
      • Overview
      • Credits
      • Modal
      • ModalWrapper
      • Notification
      • Tooltip
    • Structure
      • Overview
      • Accordion
      • AuthLayout
      • Avatar
      • Callout
      • Card
      • ContentSwitcher
      • Empty
      • Hero
      • InlineLoading
      • Item
      • List
      • Loading
      • mdxComponents
      • Module
      • Pagination
      • ReadMore
      • Story
      • Table
      • Tabs
      • Text
      • Unit
      • User
      • WFPCoreProvider
      • Wrapper
Components
Overlay
Notification

Notification

  • Design
  • Code
  • Props

ToastNotification

Editable Example

import { ToastNotification } from "@wfp/react";

() => {
  return <ToastNotification />;
};

PropDefaultDescriptionValue

timeout

number
0

Specify the timeout in milliseconds

default: 0

iconDescription

string
closes notification

Provide a description for "close" icon that can be read by screen readers

default: closes notification

onCloseButtonClick

(e: any) => void
() => {}

Provide a function that is called when menu is closed

default: () => {}

onClose

any
() => {}

Provide a function that is called when menu is closed

default: () => {}

hideCloseButton

boolean
false

Specify the close button should be disabled, or not

default: false

actions

ReactNode
–

Pass in the action nodes that will be rendered within the Notification

icon

ReactNode
–

Pass in the icon that will be rendered within the Notification or set icon to false to hide

kind

"error" |"info" |"success" |"warning" |"warning-alt"
error

Specify what state the notification represents

default: error

lowContrast

boolean
true

Specify whether you are using the low contrast variant of the Notification.

default: true

role

string
alert

By default, this value is "alert". You can also provide an alternate role if it makes sense from the accessibility-side

default: alert

statusIconDescription

string
–

Provide a description for "status" icon that can be read by screen readers

subtitle

ReactNode
–

Specify the sub-title

isDismissible

boolean
–

An optional prop that displays a close button and makes Callout to be dismissible

title

ReactNode
provide a title

Specify the title

default: provide a title

isToggleable

boolean
–

Provide toggleable functional, that Callout could show or hide content

code

boolean
–

This prop is a boolean that specifies whether the content within the Callout should be rendered as a code block. If true, it triggers the use of <pre><code> tags to format the content with monospaced font and preserved whitespace, ideal for displaying code.

On this page

  • ToastNotification

References

  • Storybook
Storybook
Figma library
Contact us
2025 © World Food Programme