Alert
A short message in a coloured box: success, info, warning or error.
A short message in a coloured box: success, info, warning or error.
npm install @mui/material
First time with Material UI? Set it up once.
/**
* Demo from Material UI, https://mui.com/material-ui/ (docs demo BasicAlerts)
* MIT License, Copyright (c) 2014 Call-Em-All. Full text: https://github.com/mui/material-ui/blob/master/LICENSE
*/
'use client';
import Alert from '@mui/material/Alert';
import Stack from '@mui/material/Stack';
export default function BasicAlerts() {
return (
<Stack sx={{ width: '100%' }} spacing={2}>
<Alert severity="success">This is a success Alert.</Alert>
<Alert severity="info">This is an info Alert.</Alert>
<Alert severity="warning">This is a warning Alert.</Alert>
<Alert severity="error">This is an error Alert.</Alert>
</Stack>
);
}