Skip to Content

Alert

import { Alert } from '@gg-software/ui'; <Alert tone="info" title="Heads up">A new version is available.</Alert> <Alert tone="warning" closable onClose={() => dismiss()}>Your trial ends in 3 days.</Alert> <Alert tone="error" title="Payment failed" action={<Button size="sm" danger>Retry</Button>}> The card was declined. </Alert> // full-width banner style, custom/hidden icon <Alert banner icon={false}>Scheduled maintenance tonight.</Alert>

For transient notifications use Toast.

Props

PropTypeDefaultDescription
tone"info" | "success" | "warning" | "error"info
titleReactNode
childrenReactNodecontent rendered inside the component
iconReactNodecustom icon, or `false` to hide it
closablebooleanfalse
onClose(() => void)
bannerbooleanfalse
actionReactNode
classNamestring

* required · generated from packages/ui/src/display/Alert/Alert.tsx