Toast

Designer doc
Toast is just a simple styled component. If you’re looking for toast notification, check out integration with Pusher below to achieve that. Pusher and Toast are separated due to flexibility concern, in goal that Pusher should also be able to push other elements, not only Toast.

Example

Basic Usage
View code
Actions
There is a component called ToastClose to render the cross icon. Please refer to More Examples to see how to integrate with Pusher to close a toast.
View code
Custom Icon
By default, Coral Toast determines which icon to use based on type prop. You can customize by specifying icon prop or remove the icon by passing null to it.
View code
Combining Toast and Pusher
View code
More Examples
View code

Accessibility

There are differences between status and alert role, one of them is that status role does not interrupt currently read text. On the other hand, alert role interrupts because it’s a time sensitive message.
Toast determines which one of the two roles to use based on type prop: success and info have status role, while warning and fail have alert role.

Relevant components

References

API

Toast
Prop nameTypeDefaultDescription
actionContainerPropsDivProps
actionsReactNode
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
contentContainerPropsDivProps
footerActionsReactNode
footerActionsPropsDivProps
iconReactNode
iconWrapperPropsDivProps
typeToastTypesinfo
ToastClose
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
colorTypeColorTypes
Set color based on theme. If color is specified, that prop is used instead of this.
disabledboolean
Equivalent to button's disabled property.
keyboardClickKeysstring[]
loadingboolean
onBlurFocusEventHandler<HTMLDivElement>
onClickMouseEventHandler<HTMLDivElement>
onKeyDownKeyboardEventHandler<HTMLDivElement>
onKeyUpKeyboardEventHandler<HTMLDivElement>
onMouseDownMouseEventHandler<HTMLDivElement>
onMouseLeaveMouseEventHandler<HTMLDivElement>
onMouseUpMouseEventHandler<HTMLDivElement>
onReleaseEventHandler<SyntheticEvent<HTMLDivElement, Event>>
Callback that's triggered after click i.e. mouseup and keyup of enter or space.
onTouchEndTouchEventHandler<HTMLDivElement>
onTouchStartTouchEventHandler<HTMLDivElement>
radiusstring
sizeIconButtonSizes
tooltipReactNode
tooltipPropsOmit<TooltipProps, "title" | "children">
variantIconButtonVariants
    Example
    Example
    Basic Usage
    Basic Usage
    Actions
    Actions
    Custom Icon
    Custom Icon
    Combining Toast and Pusher
    Combining Toast and Pusher
    More Examples
    More Examples
    Accessibility
    Accessibility
    Relevant components
    Relevant components
    References
    References
    API
    API
    Toast
    Toast
    ToastClose
    ToastClose
Coral is a thoroughly developed design system widely adopted by developers and designers for creating beautiful and user-friendly Sea internal products.

Copyright © 2018-2025 Sea Labs