Browse components

Alert

import Alert from "@shpaw415/mui-lite/Alert";

Why use it

Alert surfaces feedback after an action: success, info, warning, or error. Prefer it over toast for persistent page-level messages; use Snackbar for transient notices.

Demo

Example

import Alert from "@shpaw415/mui-lite/Alert";
 
<Alert severity="success" onClose={() => {}}>
  Changes saved.
</Alert>
<Alert severity="error" variant="filled" title="Failed">
  Could not save.
</Alert>

Props

PropTypeDefault
severityerror | info | warning | successrequired
variantdefault | filled | outlineddefault
titlestring
onClosefunction
iconReactNode | falseauto