使用

::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](/).
::

::

链接

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

变体

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

标题

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

属性

titlestring
Alert title
iconstring
Alert icon
type'default' | 'info' | 'warning' | 'success' | 'danger' | 'secondary'
'default'
tostring
链接 URL
targetTarget
在链接上应用的 target 属性值
externalboolean
target='_blank' 的别名
showLinkIconboolean
true
是否显示链接指示图标