Inline
- State the fact, then what to do.
- An error is never a dead end: it must offer an action (call, read, ask Evantis). The code won't compile without one.
- Error and warning interrupt (role alert); success and info don't.
- solid is for critical, blocking states only.
Information:
Your nurse replied
Open the message to read it.
Success:
Dose logged
Oxycodone 5 mg at 08:00.
Warning:
Next dose due in 15 minutes
Acetaminophen 500 mg.
Error:
Dose exceeds daily maximum
12 mg ordered; limit is 10 mg in 24 h. Call your care team before giving it.
Sizes
- LG for page-level messages: 16px title and text, 20px glyph.
- MD is the default: 14px, 16px glyph.
- SM inside cards and forms: 12px, 14px glyph.
Warning:
Next dose due in 15 minutes
Acetaminophen 500 mg.
Warning:
Next dose due in 15 minutes
Acetaminophen 500 mg.
Warning:
Next dose due in 15 minutes
Acetaminophen 500 mg.
Parts
- Compose with AlertTitle, AlertDescription and AlertAction when you need more than a sentence.
- Composed or passed as a prop, the action always sits far right, where Dismiss sits on other alerts.
- The action is one link-style button: a verb in Title Case.
Warning:
Your plan changed today
Dr. Lopez added a new medication. Review it before the next dose.
Dismiss
- Pass onDismiss to show a Dismiss button.
- Error alerts never offer Dismiss: they stay until the problem is fixed.
- Dismiss hides the message; it doesn't undo what it reported.
Information:
Your nurse replied
Open the message to read it.
Success:
Dose logged
Oxycodone 5 mg at 08:00.
Error:
Dose exceeds daily maximum
Error alerts never show Dismiss, even when onDismiss is passed. They always offer a way forward instead.