Alert

Designer doc
Alert component to notify users of information, warnings or errors.

Example

Basic Usage
View code
Controlling closed state
View code
Customizing icons
By default, Alert adds an icon based on the type prop. You can specify your custom icon or pass null to hide it.
View code
Title
View code
View code

References

API

Alert
Prop nameTypeDefaultDescription
actionsReactNode
actionsPropsDivProps
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
closedboolean
containerRefRef<HTMLDivElement>
@deprecated Please pass ref directly instead.
contentPropsDivProps
descriptionPropsDivProps
footerActionsReactNode
footerActionsPropsDivProps
iconReactNode
iconWrapperPropsDivProps
immediateboolean
initialClosedboolean
onClose(closed: boolean) => void
titleReactNode
titlePropsDivProps
typeAlertTypesinfo
AlertClose
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">
variantIconButtonVariantsflat
    Example
    Example
    Basic Usage
    Basic Usage
    Controlling closed state
    Controlling closed state
    Customizing icons
    Customizing icons
    Title
    Title
    Footer Actions
    Footer Actions
    References
    References
    API
    API
    Alert
    Alert
    AlertClose
    AlertClose
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