Function: InlineAlert()
InlineAlert(
__namedParameters):Element
Defined in: components/InlineAlert/InlineAlert.tsx:175
A standing report — feedback about a condition that is true now, in the flow of the page, for as long as it holds.
Entity = Feedback, Interaction Kind = status.passive. Pick it against
Toast by who owns the lifetime: a toast ends on a timer or a dismissal;
this ends when the condition ends. It occupies layout, it is idempotent
(rendering it twice is one state, not two notifications), and it can be
scrolled to.
| You are reporting… | Use |
|---|---|
| an event that just happened, and the report expires | Toast |
| a condition that holds while the page shows it | InlineAlert |
| something needing an answer before the user proceeds | DialogModal |
| a chip-sized state the system observed | StatusLight |
| the result of validating what the user typed | a field's isInvalid |
The surface announces politely via role="status", which is correct in both
arrangements without any detection: a live region does not announce
content that was already present when it was registered, so mounted with the
page it is silent, and inserted in response to an action it announces. Do not
add aria-live (the role already implies polite; both together double up on
some assistive technology) and do not name the region with aria-labelledby
(a name competes with the content it is announcing).
Parameters
| Parameter | Type |
|---|---|
__namedParameters | InlineAlertProps |
Returns
Element
Examples
<InlineAlert evaluation="caution" title="Read-only mode">
Scheduled maintenance until 22:00. Changes will not be saved.
</InlineAlert>
<InlineAlert
evaluation="negative"
title={t.syncFailedTitle}
actions={<Button evaluation="primary" onPress={retry}>{t.retry}</Button>}
>
{t.syncFailedBody}
</InlineAlert>