Skip to main content

AlertKind

AlertKind is the severity enum used by Alert.

It answers a product question, not only a color question: what kind of message is this? A good alert kind helps people judge urgency before they read every word.

Example

use fission::prelude::*;

let node = Alert {
kind: AlertKind::Warning,
title: "Storage almost full".into(),
description: Some("Uploads may fail until space is cleared.".into()),
}
.build(ctx, view);

Choice table

ChoiceTypeMeaningNotes / default behavior
InfoAlertKindInformational message.Good for neutral guidance or status updates.
WarningAlertKindPotential problem that needs attention soon.Good when the user should notice risk before failure.
ErrorAlertKindSomething failed or is invalid right now.Use when the user needs to recover or change input.
SuccessAlertKindPositive confirmation that something worked.Best for meaningful success, not every tiny action.

Specific advice

Pick the kind based on product meaning, not aesthetics. If everything becomes a warning just because orange looks noticeable, users lose trust in the severity system.

Alert, ToastKind, Badge, and EmptyState.