Notifications
A Notification is a passive status update that keeps users informed of system progress.
Used for this
- For a passive status update about user or system activity
Not for this
- For contextual feedback that may require action or decision, use an Alert instead
How to use it
Default
The typical usage of a Notification component.
Info
Turnip greens yarrow ricebean endive cauliflower sea kohlrabi amaranth waterPlacement
There are 6 placement options available. The Notification occupies the
top-end
position by default.
Type
Types indicate what kind of message is in the notification and help the user understand how to respond. They can be info, warning, error, or success.
Info
Turnip greens yarrow ricebean cauliflower sea lettuce kohlrabi amaranth waterWarning
Corn amaranth salsify bunya nuts nori azuki bean potato bell pepper artichokeError
Celery quandong swiss chard chicory earthnut pea potato. Salsify taro catsear garlicSuccess
Corn amaranth salsify bunya nuts nori azuki bean chickweed potato bell pepper artichokeConfiguration
- Name9.5.1•View source•View on npm
- Installnpm install @zendeskgarden/react-notifications
- Depsnpm install react react-dom styled-components @zendeskgarden/react-theming
- Importimport { Notification, ToastProvider } from '@zendeskgarden/react-notifications'
API
Notification
Prop name | Type | Default | Description |
---|---|---|---|
type | 'success' | 'warning' | 'error' | 'info' | Applies notification type styles |
Notification.Close
Extends ButtonHTMLAttributes<HTMLButtonElement>
Notification.Paragraph
Extends HTMLAttributes<HTMLParagraphElement>
Notification.Title
Extends HTMLAttributes<HTMLDivElement>
Prop name | Type | Default | Description |
---|---|---|---|
isRegular | boolean | Applies regular (non-bold) font weight |
ToastProvider
Prop name | Type | Default | Description |
---|---|---|---|
limit | number | 4 | Limits the number of visible toasts |
placementProps | Partial<Record<'top' | 'bottom' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end', HTMLAttributes<HTMLDivElement>>> | {} | Passes placement-based customization props to the toast's parent element |
zIndex | number | Sets the |