组件特性

Alert

展示提示、警告和状态信息的提醒组件。

Usage

A default alert with code and a link.

A secondary alert with code and a link.

::alert{icon="lucide:info"}
  A **default** alert with `code` and a [link](/).
::

::alert{type="secondary" icon="lucide:info"}
  A **secondary** alert with `code` and a [link](/).
::

::

A link alert.

::alert{to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank" icon="lucide:link"}
  A **link** alert.
::

Variants

An info alert with code and a link.

::alert{type="info" icon="lucide:info"}
  An **info** alert with `code` and a [link](/).
::

Title

Title

An alert with a title.

::alert{title="Title" icon="lucide:layout-list"}
  An alert with a title.
::

Props

title
string
Alert title
icon
string
Alert icon
type
'default' | 'info' | 'warning' | 'success' | 'danger' | 'secondary'
to
string
Link URL
target
Target
A target attribute value to apply on the link
external
boolean
Alias to target='_blank'
showLinkIcon
boolean
Whether to show the link indicator