Alert
A banner in the flow of a page: a tinted box with a 16 px icon centred on 12 px text, in five kinds, with an optional title, link and dismiss. Each kind has its own icon, so colour is never the only signal.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { Alert } from "@leap-crm/design-system";Playground
Change a prop and the component follows. Its code is under Props.
Conflict check needed
Run a check before you convert this opportunity.
Props
kind
title
children
action
onDismiss
Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Use it for a condition on the page that stays until it's resolved, like a mailbox that isn't connected, and put the fix in action as a TextLink. |
| Do | Add role="alert" or role="status" only when it appears in response to something, like a sync that just failed, so a banner that was there on load isn't announced. |
| Do | Use neutral for a fact that needs no action, like matters created before 2024 not showing billing totals. |
| Do | Write an error as what happens next or what to do, like "We couldn't reach LEAP. Changes will sync when it's back." |
| Don't | Rely on colour alone to tell a warning from an error. Say which it is in the title or the text, so it reads the same to someone who can't see the colour. |
| Don't | Use it to confirm something the person just did, like saving a contact. Use toast. |
Props
Also takes every prop of a <div>. Add role="alert" or role="status" only when it appears in response to something, so a static banner isn't announced.
| Prop | Type | Default | Description |
|---|---|---|---|
| kind | "info" | "success" | "warning" | "error" | "neutral" | "info" | Info (navy tint), success, warning, error or neutral. |
| title | ReactNode | — | An optional bold first line. |
| action | ReactNode | — | A link on the right that resolves it, like a TextLink "Connect". |
| onDismiss | () => void | — | Shows a × on the right and runs when it's pressed. |
| dismissLabel | string | "Dismiss" | Names the × when "Dismiss" isn't enough. |
Code
What the playground shows, ready to copy.
import { Alert } from "@leap-crm/design-system";
<Alert
title="Conflict check needed"
>
Run a check before you convert this opportunity.
</Alert>Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| EnterSpace | Dismisses it, with focus on its close button. |





