yarn add @chakra-ui/alert
# or
npm i @chakra-ui/alert
导入组件
import {
Alert,
AlertTitle,
AlertIcon,
AlertDescription,
} from "@chakra-ui/alert"
基本用途
<Alert status="error" variant="solid" justifyContent="center">
<AlertIcon />
<AlertTitle>Your browser is outdated!</AlertTitle>
<AlertDescription>Your Chakra experience may be degraded.</AlertDescription>
</Alert>