Docs
警告框(Alert)
警告框(Alert)
显示提示信息以引起用户注意。
Heads up!
You can add components to your app using the cli.
安装
npx shadcn@latest add alert
用法
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
<Alert>
<Terminal className="h-4 w-4" />
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components and dependencies to your app using the cli.
</AlertDescription>
</Alert>
示例
默认样式
Heads up!
You can add components to your app using the cli.
强烈警告
Error
Your session has expired. Please log in again.