---
title: "Alert"
canonical_url: "https://nnsvn.me/products/nuxt-starter-kit/components/docs/alert"
---

> Index of every page on this site: [llms.txt](https://nnsvn.me/llms.txt)

## Usage

<ct-stack>
<div className="p-4">
<ct-alert icon="lucide:info">

A **default** alert with `code` and a [link](https://nnsvn.me/).

</ct-alert>

<ct-alert icon="lucide:info" type="secondary">

A **secondary** alert with `code` and a [link](https://nnsvn.me/).

</ct-alert>
</div>
</ct-stack>

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

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

::

### Link

<ct-stack>
<div className="p-4">
<ct-alert icon="lucide:link" target="_blank" to="https://github.com/No-Name-Studio-VN/Homepage">

A **link** alert.

</ct-alert>
</div>

```mdc
::ct-alert{to="https://github.com/No-Name-Studio-VN/Homepage" target="_blank" icon="lucide:link"}
  A **link** alert.
::
```

</ct-stack>

### Variants

<ct-tabs variant="line">
<ct-stack icon="lucide:info" label="info">
<div className="p-3">
<ct-alert icon="lucide:info" type="info">

An **info** alert with `code` and a [link](https://nnsvn.me/).

</ct-alert>
</div>

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

</ct-stack>

<ct-stack icon="lucide:pencil" label="note">
<div className="p-3">
<ct-alert icon="lucide:pencil" type="note">

A **note** alert with `code` and a [link](https://nnsvn.me/).

</ct-alert>
</div>

```mdc
::ct-alert{type="note" icon="lucide:pencil"}
  A **note** alert with `code` and a [link](/).
::
```

</ct-stack>

<ct-stack icon="lucide:lightbulb" label="success">
<div className="p-3">
<ct-alert icon="lucide:lightbulb" type="success">

A **success** alert with `code` and a [link](https://nnsvn.me/).

</ct-alert>
</div>

```mdc
::ct-alert{type="success" icon="lucide:lightbulb"}
  A **success** alert with `code` and a [link](/).
::
```

</ct-stack>

<ct-stack icon="lucide:test-tube" label="example">
<div className="p-3">
<ct-alert icon="lucide:test-tube" type="example">

An **example** alert with `code` and a [link](https://nnsvn.me/).

</ct-alert>
</div>

```mdc
::ct-alert{type="example" icon="lucide:test-tube"}
  An **example** alert with `code` and a [link](/).
::
```

</ct-stack>

<ct-stack icon="lucide:triangle-alert" label="warning">
<div className="p-3">
<ct-alert icon="lucide:triangle-alert" type="warning">

A **warning** alert with `code` and a [link](https://nnsvn.me/).

</ct-alert>
</div>

```mdc
::ct-alert{type="warning" icon="lucide:triangle-alert"}
  A **warning** alert with `code` and a [link](/).
::
```

</ct-stack>

<ct-stack icon="lucide:circle-x" label="danger">
<div className="p-3">
<ct-alert icon="lucide:circle-x" type="danger">

A **danger** alert with `code` and a [link](https://nnsvn.me/).

</ct-alert>
</div>

```mdc
::ct-alert{type="danger" icon="lucide:circle-x"}
  A **danger** alert with `code` and a [link](/).
::
```

</ct-stack>
</ct-tabs>

### Title

<ct-stack>
<div className="p-4">
<ct-alert icon="lucide:layout-list" title="Title">

An alert with a title.

</ct-alert>
</div>

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

</ct-stack>

## Props

<ct-field-group>
<ct-field name="title" type="string">

Alert title

</ct-field>

<ct-field name="icon" type="string">

Alert icon

</ct-field>

<ct-field name="type" type="'default' | 'info' | 'warning' | 'success' | 'danger' | 'secondary'" default-value="'default'">



</ct-field>

<ct-field name="to" type="string">

Link URL

</ct-field>

<ct-field name="target" type="Target">

A `target` attribute value to apply on the link

</ct-field>

<ct-field name="external" type="boolean">

Alias to `target='_blank'`

</ct-field>

<ct-field name="showLinkIcon" type="boolean" default-value="true">

Whether to show the link indicator <ct-icon name="lucide:arrow-up-right">



</ct-icon>
</ct-field>
</ct-field-group>

## Sitemap

See the full [sitemap](https://nnsvn.me/sitemap.md) for all pages.
